php - How to: Copy files from a source to a destination -
i looking way have files in source, say:
/public_html/source/sourcefiles/
and when, in admin panel, create new 'game' (in case), might called category, or et cetera in other projects, copy source files directory such as:
/public_html/games/gamename/sourcefiles_copied_here/
is there way this?
if possible, i'd need way delete them when game/category deleted.
the php copy
function useful copying files source, new directory.
it used this:
copy(sourcedir, destdir);
keep in mind files exist in destination directory same name files being copied overwritten.
to move file, use rename
function.
Comments
Post a Comment