![]() |
Create new folder & add file template in php?
I'm currently trying to get a part of an admin system setup whereby I can create a new sub directory on a domain, I have that part working however, I'm having issues putting a .php template into the directory once it has been created.
Here is the code I'm using to create the directory itself on the server: Quote:
Quote:
Could someone with a little more knowledge take a moment to point me in the right direction on how I get the new page creation to work please? Im not getting any error logs when the button on the submit form is clicked :helpme |
You're not writing anything so obviously nothing will be written.
If all you're doing is copying an existing template to a new directory then: <?php $mytemplate="mytemplate.txt"; $newfolder="new"; mkdir($newfolder); copy($mytemplate,$newfolder."/".$mytemplate); ?> |
Quote:
I need a html form to be able to name the new directory which also needs to upload that file based on an existing template, Im not having 8 or so people who use this system be able to log into the server to do that manually each time, it defeats the purpose of having a backend system to do it :2 cents: It also means I need to make sure the people using the php you suggested, are competant when it comes to logging onto the server and arent going to fuck anything thats already in place, up. |
Quote:
Quote:
Quote:
Quote:
1. mkdir "dir" 2. Upload to "dir" Quote:
|
All times are GMT -7. The time now is 11:22 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc