I want to copy the contents of a directory to another directory each time the page is loaded it should automatically update a certain directory copy new files over from a certain other directory, of this makes sense.
The page that is loaded will have a list of all the files that are now in a directory (shall call it destination) upon going to that page it will first check to see if there are any new files in another directory (shall call this one source) if there are then it will copy them over to the destination directory?
I have tried using the copy(); function but opening a directory, reading it and then copying it over but doesnt work, it talks about the permissions being wrong (accessed denied).
I have looked at php.net - cant really understand it that well? Help.