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 Quote 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); Quote 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! Quote Link to comment https://forums.phpfreaks.com/topic/119672-duplicate-and-rename/#findComment-616536 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.