odd behavior
| From: | Eduardo Kokubo | Date: | Tue, 24 Jul 2001 17:53:49 +0000 |
| Subject: | odd behavior | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59386@lists.php.net to get a copy of this message | ||
Hi,
I have been trying to create a directory and a file in it on my server, but my code is not
working fine.
<?php
$arquivo = fopen("publico/diretorio.txt","r");
$cont = fread($arquivo, 5);
$cont++;
fclose ($arquivo);
$arquivo = fopen ("publico/diretorio.txt","w+");
fwrite ($arquivo, $cont);
fclose ($arquivo);
setcookie("cont", $cont);
$diretorio = "d".$cont;
if (!is_dir("publico/$diretorio")){
$dirteste = mkdir("publico/$diretorio",0777);}
if ($textfile = fopen("publico/$diretorio/index.html", "w+")){
fputs($textfile,ob_get_contents());
fclose($textfile);
chmod("publico/$diretorio/index.html", 0755);}
ob_end_flush();
?>
This was working fine and then stoped. Does anybody know what happened?????
I have permission to write but I'm receving the following message:
Warning: fopen("publico/d6/index.html","w+") - Permission denied in
/home/a0010927/public_html/index.php on line 56