Почему, когда я ставлю любой пхп скрипт, использующий ф-цию fopen, или что-то типа етого, он пишет:
Warning: fopen(stat.dat): failed to open stream: Permission denied in /home/a0000500/public_html/razgon/test/log.php on line 16
(Добавление)
CODE:<?
$sf ="stat.dat";
$fpsf=fopen($sf,"a+");
$ip=getenv("REMOTE_ADDR");
$ag=getenv("HTTP_USER_AGENT");
$from=getenv("HTTP_REFERER");
$host=getenv("REQUEST_URI");
$date = date("d.m.y");
$time= date("H:i:s");
fputs($fpsf,"$date#$time#$ip#$ag#$from#$host\n");
fclose($fpsf);
// ñ÷åò÷èê
$cf = "cont.dat";
$fpcf=fopen($cf,"r");
if ($fpcf) {
$counter=fgets($fpcf,10);
fclose($fpcf);
} else {
$counter=0;
}
$counter++;
$fpcf = @fopen($cf,"w");
if ($fpcf) {
$counter=fputs($fpcf,$counter);
fclose($fpcf);
}
?> -вот код
вот так ругается:
Цитата:Warning: fopen(stat.dat): failed to open stream: Permission denied in /home/a0000500/public_html/razgon/test/log.php on line 16
Warning: fputs(): supplied argument is not a valid stream resource in /home/a0000500/public_html/razgon/test/log.php on line 23
Warning: fclose(): supplied argument is not a valid stream resource in /home/a0000500/public_html/razgon/test/log.php on line 24
Warning: fopen(): Unable to access cont.dat in /home/a0000500/public_html/razgon/test/log.php on line 28
Warning: fopen(cont.dat): failed to open stream: Permission denied in /home/a0000500/public_html/razgon/test/log.php on line 28
|