Dazzozo Posted May 29, 2008 Share Posted May 29, 2008 Hey! I'm trying to make a file copy in to another directory, but I get a failed to open stream error. Here is the error I am getting. Warning: copy(http://dazzozo.com/test/index.php) [function.copy]: failed to open stream: HTTP wrapper does not support writeable connections. in /home/dazzozo/public_html/sourcefolder/test.php on line 7 An error occured. This is the PHP code that is being used. <?php $subdomain = "test"; $sourcefile = "index.php"; $destinationfile = "http://$subdomain.dazzozo.com/index.php"; if(copy($sourcefile, $destinationfile)) { echo "Copying successful.", "\n"; } else { echo "An error occured.", "\n"; } ?> The PHP file this is in is called 'test.php', and the file it is trying to copy is 'index.php' from 'sourcefolder' to 'test'. Why am I getting this error? Thanks, Dazzozo. Link to comment https://forums.phpfreaks.com/topic/107802-php-copy-failed-to-open-stream-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.