alexander007 Posted October 20, 2007 Share Posted October 20, 2007 Im trying to copy a file from the root of my website to other folder.. $source='/home/content/maunalava/html/dev-netteampr/portales/index.php'; $destination=('/home/content/maunalava/html/dev-netteampr/portales/' . $usuario); copy($source, $destination); But I keep getting...failed to open stream: Is a directory in.... Quote Link to comment https://forums.phpfreaks.com/topic/74088-copy-a-file-with-php/ Share on other sites More sharing options...
Orio Posted October 20, 2007 Share Posted October 20, 2007 Remove the brackets around $destination. If that doesn't work, please post the full error. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/74088-copy-a-file-with-php/#findComment-374060 Share on other sites More sharing options...
alexander007 Posted October 20, 2007 Author Share Posted October 20, 2007 Im still getting the same error.. failed to open stream: Is a directory in.... Quote Link to comment https://forums.phpfreaks.com/topic/74088-copy-a-file-with-php/#findComment-374184 Share on other sites More sharing options...
Ninjakreborn Posted October 20, 2007 Share Posted October 20, 2007 Use the document root in the server variable to help find the path. Check if the file exists BEFORE attempting any moves, also check to make sure the permissions are correct on it. Quote Link to comment https://forums.phpfreaks.com/topic/74088-copy-a-file-with-php/#findComment-374204 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.