I have this code to copy an html file and rename it. However it doesn’t do this, and I have tried tons of variations of the code but still nothing. I’m probably just overlooking something, or I forgot something.
$file = 'example.html';
$newfile = '$bla.html;
Any ideas on how to fix this? Or a different code? Thanks in advance!
All you’re doing here is creating variables, you have to actually copy the file. Check out PHP’s
copy()function.Here’s an example of how to use it:
http://php.net/manual/en/function.copy.php