I have a line of code that is supposed to copy image from one directory to another:
copy("http://localhost:8080/wordpress/wp-content/uploads/2015/06/uploaded_background.jpg","http://localhost:8080/wordpress/wp-content/themes/landing-page/img/desktop-background.jpg");
This is located in wordpress theme header.php file, however I am receiving an error message:
Warning: copy(http://localhost:8080/wordpress/wp-content/themes/landing-page/img/desktop-background.jpg): failed to open stream: HTTP wrapper does not support writeable connections in C:\wamp\www\wordpress\wp-content\themes\landing-page\header.php on line 42
Line 42 is where my copy function line is located.
How can I solve this issue. Any suggestions or links would help a lot.