There are files in the /var/www/vhosts/domain.com/statistics/logs which I would like to read. If you use FTP to look at it, /statistics and /httpdocs are at the same level. How do I access the files in the /statistics if I have a program www.domain.com/testing.php to list the files at the /statistics/logs? What will be the correct path? Thanks for any help in advance.
Most hosts have slightly different setups, you should contact your web host provider and ask them directly for accurate information pertaining to your servers setup
/var/www/vhosts/domain.com/statistics/logs is the correct path Your FTP access will typically start you at your HOME folder : /var/www/vhosts/domain.com/
I just want to list the files at the logs directory first before I do anything else. And I got "open_basedir restriction in effect. File(../../statistics/logs) is not within the allowed path(s)" error. How should I explain it to the hosting company in order to change the restriction? $dir = opendir("../statistics/logs"); //List files in images directory while (($file = readdir($dir)) !== false) { echo "filename: " . $file . "<br />"; } closedir($dir); ?>
The hosting company modified the open_basedir so it is working now. My next question is how to list the file with time stamp. readdir() only list the name of the file. I would like to know when the file is created also. Is there anyway to do it?
I solved it. See the link. Thanks for all the help. http://forums.digitalpoint.com/showthread.php?t=1382653