php-general Digest 2 Dec 2011 19:30:42 -0000 Issue 7595
Topics (messages 315919 through 315919):
file_exists fun
315919 by: Dee Ayy
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
The following code:
$new_file =
ADS_DIR_INTERNAL.'/'.$ad_info['id'].'_'.$ad_info['filename'];
echo "NEW_FILE:[".$new_file."]\n";
echo "file_exists Using
VAR:[".file_exists($new_file)."]\n";
echo "file_exists Using Hard
Coded:[".file_exists('/home/fx/pads/ads_dir/1_rubik1920x1080lu0.jpg')."]\n";
Gives this output:
NEW_FILE:[/home/fx/pads/ads_dir/1_rubik1920x1080lu0.jpg]
file_exists Using VAR:[]
file_exists Using Hard Coded:[1]
Why does it not work when using the variable in file_exists?
I thought I may need some safe_mode magic, safe_mode_include_dir, or
disable_functions, but I don't see any restrictions AND why does it
work when it is hard coded?
Warning
This function returns FALSE for files inaccessible due to safe mode
restrictions. However these files still can be included if they are
located in safe_mode_include_dir.
Current logic needs the following functions:
file_exists
md5_file
move_uploaded_file
Thanks.
--- End Message ---