I've created a small php script to create a new directory on the server, and now want to copy five files from one directory (on the same server) to the new directory and also chmod them 755.
Can anyone give me a good example for doing this? So far all I've found is:
$source_file = '/tmp/file.html';
$dest_file = '/home/mydomain/file.html';
copy($source_file, $dest_file);
thanks in advance
how do I copy files from one dir to another?
Moderator: General Moderators
Check out the function chmod() and explore around the PHP manual's filesystem section.
Keep an eye on the user notes because often they can be very helpful for beginners in a specific part of PHP scripting.
Keep an eye on the user notes because often they can be very helpful for beginners in a specific part of PHP scripting.