var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
[PHP]: Permission denied ?
i'm trying to extact the file "/tmp/webalizer/index.html" to the public by php code
but it dont work
$handle = fopen ( "/home/site/tmp/webalizer/index.html" , "r" );
echo $handle ;
fclose ( $handle );
it gave me
so i tryed to change it from 644 to 666 to 755 but nochange is happen
Warning: fopen(/home/site/tmp/webalizer/index.html): failed to open stream: Permission denied in /home/racing4e/public_html/bandwdith.php on line 2
Warning: fclose(): supplied argument is not a valid stream resource in /home/site/public_html/bandwdith.php on line 4
any one know whats wrong here ?
It seems like php work in safe mode and the owner of "index.html" file differ from user that execute your script. Usually it is apache or nobody. So you should turn safe mode off.
why dont you do this via shell:
cd ~ ; cd www
ln -s /home/site/tmp/webalizer/index.html ./band.html
and then you can access it from:
$a = include('http://domain/band.html');
would work fine
i'm trying to do this to select the bandwidth line and show it out to the vistor by echo or what ever
i search about php code do this job but i didnt find one
so i'm trying to do it by my self
the file is in the tmp dir
in anather word it's out of public_html
and for my that's the deficalt part
how to fetch a file out of the public_html to the main page of my website
did you tried what i told you ?
didnt worked ??
Seems 'apache' user have no permissions to read this file.
try to add read permissions in console with
% chmod 655 /home/site/tmp/webalizer/index.html
Also I'm not sure that
would work.. you should read file with fread() function..