Jump to content

Error Copying File


ballouta

Recommended Posts

Hello

I have the file 353516023853268.rpl that i am sure it exists in my Public_html

 

the first php copy command works when i copy this file to the 'back' folder.

while the second is not working. it doesn't copy the file, I can;t find the problem.

 

Please note that 'ahsan' folder exists.

I also modified the code to copy this file to another directory in 'stk' folder but still have the sam eproblem.

thank you

 

<?php
echo "Copying the rpl file to the backup folder....<br>";
if (!copy("/home/wwwrpld/public_html/353516023853268.rpl", "/home/wwwrpld/public_html/back/dct4/353516023853268.rpl-Motif")) { echo "failed to copy $myf...\n"; }

echo "Copying the rpl file to the user folder.... the user here is $user <br>";
if (!copy("/home/wwwrpld/public_html/353516023853268.rpl", "/home/wwwrpld/stk/ahsan/353516023853268.rpl")) { echo "failed to copy $myf...\n"; }
?>

Link to comment
https://forums.phpfreaks.com/topic/129552-error-copying-file/
Share on other sites

I bet if you moved the stk folder to your public_html folder and changed the path accordingly this would work. I think this is an issue with PHP writing to folders outside of the public_html or www folders on apache servers. you may want to check this out and possibly check the file permissions for stk.

Link to comment
https://forums.phpfreaks.com/topic/129552-error-copying-file/#findComment-671658
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.