RE: [PHP] php - copy problem

From: Date: Wed, 03 Apr 2002 17:32:50 +0000
Subject: RE: [PHP] php - copy problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91333@lists.php.net to get a copy of this message
I did that first thing. Also tried chmod g+rwx I can copy manually via Telnet, but something is wrong with my PHP script. Thanks Craig ><> westerman@chanuteks.com -----Original Message----- From: Julian [mailto:jsamfor@gmx.net] Hi! You must to set the folder where you want to save the file to CHMOD 777 Enter to your site via FTP and CHMOD your folder to 777 or rwxrwxrwx Regards! Julian ----- Original Message ----- I'm trying to copy daily Analog Stats Report to a archive file. (see code below) Destination file doesn't exist. I get this error: Warning: Unable to create '030402.html': Permission denied in /usr/www/users/cfth/WWW_REPORTS/analogarchive.php on line 9 /WWW_REPORTS/analogarchive.php:Error failed to copy the file www.html It appears to be a permission problem. How do I set permissions to allow me to do this? Thanks Craig ><> westerman@chanuteks.com <?php # copy daily analog report to archive file $filename = "www.html"; $newfn = date("dmy"); $fnex = ".html"; if (!file_exists($filename)) { echo "Sorry cannot find the file $filename"; } else { if (!copy($filename, $newfn.$fnex)) { echo "$PHP_SELF:Error failed to copy the file $filename"; } else { echo "The file $filename copied OK to $fn$fnex"; } } ?>

« previous php.general (#91333) next »