How to use PHP copy to files?

Iwearglasses

Junior Member
Joined
Feb 6, 2022
Messages
167
Reaction score
341
I have a subdomain ex: cdn.example.com folder that I am trying to upload or copy my image files into. How would I do that? I am using shared hosting. My script uploads the file path into the database and then uploads the image file into my current directory/domain folder but I need to make a copy of it to my subdomain.
 
I have a subdomain ex: cdn.example.com folder that I am trying to upload or copy my image files into. How would I do that? I am using shared hosting. My script uploads the file path into the database and then uploads the image file into my current directory/domain folder but I need to make a copy of it to my subdomain.
I was able to resolve this. If anyone else run into this issue you can use $_SERVER['DOCUMENT_ROOT'].
 
Back
Top