Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-02-2002, 02:46 PM
joyce's Avatar
Novice Webmaster
 
Join Date: Nov 2001
Location: Malaysia
Posts: 23
Rep Power: 0
joyce is on a distinguished road
file_exists

i have a if statement...
PHP Code:
if (file_exists(DIR_FS_DOWNLOAD $downloads_values['orders_products_filename']))
echo 
"123";
else
echo 
"abc"
it is to check whether the file exists for download or not..
i keep getting abc as result although my file is exists...wat could be wrong? pls help...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 15-02-2002, 08:40 PM
Novice Webmaster
 
Join Date: Nov 2001
Location: MLK
Posts: 94
Rep Power: 87
r0kawa is on a distinguished road
Send a message via Yahoo to r0kawa
Ok, firstly to debug this you must make sure the path your specify is correct.

How about echoing the variable

echo DIR_FS_DOWNLOAD . $downloads_values['orders_products_filename'];

if this generating the path to the file, so it's wrong. or maybe you forgot to put the / in between..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 15-02-2002, 11:19 PM
Novice Webmaster
 
Join Date: Nov 2001
Location: MLK
Posts: 94
Rep Power: 87
r0kawa is on a distinguished road
Send a message via Yahoo to r0kawa
satu lagi,

cuba include braches

if($something) {

}
else {


}

ada certain function dan mungkin file_exists juga begitu,

include($file)

if($something)
include($file);
else
include($this_file);

will not work as desire, maybe the same cases with yours...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-07-2002, 05:31 PM
Novice Webmaster
 
Join Date: Dec 2001
Posts: 22
Rep Power: 0
hd2000 is on a distinguished road
Send a message via ICQ to hd2000
try this

most file function calls are cached. and make sure the file or dir that u r checking is the current dir apache is pointing to, if not change it by using chdir, then u'll get the correct result
__________________
Life is short , get funky

Last edited by hd2000; 10-07-2002 at 05:34 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +8. The time now is 08:25 PM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60