I am writing a simple script for a subscriber to create a simple web page.
I now need to copy and rename a file for use by another user.
This is the code that I am trying with and can't get it to work:
This script that is running this is in the same directory as $old and where I want $new.PHP Code:
$old = 'fr_addclub.php';
$new = 'modify_club.php';
copy($old, $new) or die("Unable to copy $old to $new.");
This is the response:
I have tried changing the file to .txt files, but that didn't work (as I expected).Unable to copy fr_addclub.php to modify_club.php.
I have changed file ownership to chmod 600 and chown to apache.apache and that hasn't worked.
Can anybody suggest what is wrong ??