Dear Sir,

       I had written a small code in php to copy a file, its as follows

       <?
         copy('/etc/test1.txt','/tmp/test.txt');
         ?>

       I had named the file as cp.php.


The problem is when i open the file in my browser(Mozilla),it issues a warning as follows

Warning: copy(/etc/test1.txt): failed to open stream: Permission denied in /var/www/html/cp.php on line 2.

      i had issued all permissions to that file, but still it doesn't work.


but when i run the same code from the command prompt by issusing as command "php cp.php"
     it works fine.


   Please help me.

Reply via email to