I have my root folder set to /var/www/html, but I have php program that suppose to access/read Reminder folder (and its content) which is located in /home/billing/work/output/Reminder, scan the folder content (directories, sub-directories, files) and return the file names.
I work on Linux, and I have tried:
set_include_path("/home/billing/work/output/Reminder");
include("/home/billing/work/output/Reminder");
I have added a symlink in the root to the Reminder folder, but none of this stuff works.
I have a variable:
$dir="/home/billing/work/output/Reminder"
and when I examine if is_dir($dir) I get false.
Can Anyone tell me how can I access the Reminder directory so I can scan the directory?
My user has permissions to Reminder folder, also I have the functions or scanning the folder and they work fine on my local host. Any help will be appreciated, I’ve been struggling for a week now.
Unless safe mode and/or open_basedir restrictions are in effect, you should be able to open files from anywhere on the local filesystem. Just provide the file/directory function you’re using with the correct path.
Of course when dealing with the filesystem then you are also dealing with filesystem permissions, so the files and directories you’re working with need to be readable by whichever user PHP is running as (If being run by the web server then this will typically be the web server user).
If the above restrictions are in effect, then I’m afraid you’re stuck.