Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
03-09-2022, 08:46 PM | #1 | ||
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
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 |
||
03-09-2022, 10:01 PM | #2 |
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
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); ?>
__________________
__________________ |
03-09-2022, 10:31 PM | #3 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
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 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. |
|
03-10-2022, 12:30 AM | #4 | |||||
Confirmed User
Industry Role:
Join Date: Apr 2019
Posts: 657
|
Quote:
Quote:
Quote:
Quote:
1. mkdir "dir" 2. Upload to "dir" Quote:
__________________
__________________ |
|||||