ballouta Posted October 21, 2008 Share Posted October 21, 2008 Hello is it possible to combine those two lines in one command? <?php if (!copy("/home/wwwrpld/public_html/$myf", "/home/wwwrpld/stk/$user/$myf")) { echo "failed to copy $myf...\n"; } if (!copy("/home/wwwrpld/public_html/$myf", "/home/wwwrpld/public_html/back/dct4/$myf-$user")) { echo "failed to copy $myf...\n"; } ?> thank you Link to comment https://forums.phpfreaks.com/topic/129386-solved-copying-files/ Share on other sites More sharing options...
JasonLewis Posted October 21, 2008 Share Posted October 21, 2008 Sure, you could separate with an || in the first statement. <?php if (!copy("/home/wwwrpld/public_html/$myf", "/home/wwwrpld/stk/$user/$myf") || !copy("/home/wwwrpld/public_html/$myf", "/home/wwwrpld/public_html/back/dct4/$myf-$user")) { echo "failed to copy $myf...\n"; } ?> Link to comment https://forums.phpfreaks.com/topic/129386-solved-copying-files/#findComment-670760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.