swamp Posted August 14, 2008 Share Posted August 14, 2008 Hi, I need a function that duplicates file 'template.php' and renames it to what the output of a form field... ( ".$_POST['pagename']." ) Any help really appreciated! Thanks Link to comment https://forums.phpfreaks.com/topic/119672-duplicate-and-rename/ Share on other sites More sharing options...
wildteen88 Posted August 14, 2008 Share Posted August 14, 2008 use copy, eg $newname = $_POST['pagename']; copy('path/to/yourfile.ext', 'new/path/'.$newname); Link to comment https://forums.phpfreaks.com/topic/119672-duplicate-and-rename/#findComment-616534 Share on other sites More sharing options...
swamp Posted August 14, 2008 Author Share Posted August 14, 2008 awesome - cheers mate! Link to comment https://forums.phpfreaks.com/topic/119672-duplicate-and-rename/#findComment-616536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.