2157 posts
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Bought between 10 and 49 items
- Exclusive Author
- Germany
- Has been a member for 4-5 years
- Interviewed on the Envato Notes blog
- Item was Featured
crozer
says
Hey,
I was wondering if it could be possible to create a function for the custom admin page, that allows the user to write i.e. 99, and use this number to edit a file’s name i.e. single-99.php
So by writing 99, the user told the function to add that number to single- so that it turns out single-99.php. Any ideas if this could be possible?
Thanks!
BroOf
says
There is a solution to rename files with PHP :
<?php rename("old_test.php","new_text.php");
?>
And this is the syntax:
<?php rename("OLD FILE NAME","NEW FILE NAME");
?>
