-
PHP copy?
Okay quick question why do not want this code:
Code:
$ file = '/ user.php';
$ newfile = '/ users / $ username / index.php';
if (! Copy ($ file, $ newfile)) (
$ feedback [] = 'Error: File creation failed';
:)
Work? Error follows:
Code:
Warning: copy (/ user.php) [function.copy]: failed to open stream: No such file or directory in b-landia.net/httpdocs/temp/upload/inc/register.inc.php on line 41
I have tried to run at full http string on the boot file, which works out (but SOMEHOW I do not want to do) how do I do?
Edit: Well just that user.php is in the same map as the script? but it runs over a regg where a folder is created with the name of the variable $ username
-
Re: PHP copy?
You must have 'character instead of' symbol, if you want the variables to parse the To:
Code:
$ newfile = "/ users / $ username / index.php";
-
Re: PHP copy?
Thanks! :thumbup1: for those interested:
Code:
$ file = ". / Inc / user.php";
$ newfile = "users / $ username / index.php";
if (! Copy ($ file, $ newfile)) (
$ feedback [] = 'Error: File creation failed';
)
Page generated in 1,717,385,852.44305 seconds with 10 queries