Rokboy Posted November 11, 2009 Share Posted November 11, 2009 I need assistance with the development of a simple tool (php). When an end user clicks on a publish button on a particular HTML page (ie. http://www.domain.com/8209384ui2u30942/example.html) the web page "...example.html" should duplicate itself AUTOMATICALLY within the ".../8209384ui2ui2u30942/" folder, and rename the duplicated file "index.html". If there is an existing file called "index.html", it should over write it. My server currently creates random folder names (ie. http://www.domain.com/8209384ui2u30942/) so each long code will be different from user to user. Can someone help...? Link to comment https://forums.phpfreaks.com/topic/181152-duplicate-within-a-server-then-rename-file/ Share on other sites More sharing options...
simshaun Posted November 11, 2009 Share Posted November 11, 2009 Duplicating a file is done with copy(). Removing a file is done with unlink(). Renaming a file is done with rename(). Short of writing the script for you, there shouldn't be anything else that you need to know other than maybe chmod(). Link to comment https://forums.phpfreaks.com/topic/181152-duplicate-within-a-server-then-rename-file/#findComment-955732 Share on other sites More sharing options...
Rokboy Posted November 11, 2009 Author Share Posted November 11, 2009 HI, I'M PRETTY THICK AT PHP SCRIPTING, I NEED SOME ONE TO HELP ME WITH A SCRIPT. BEFORE I PULL MY HAIR OUT!!!! Link to comment https://forums.phpfreaks.com/topic/181152-duplicate-within-a-server-then-rename-file/#findComment-955735 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.