I´m experiencing a strange error when trying to upload a file.
First, I´m using a form and a script that already works in another work I did in the past.
The form I´m using is:
<form enctype="multipart/form-data" action="(My_URL)" method="post">
Foto<input type="file" name="userfile">
<input type="submit" name="prosseguir" value="Gravar foto">
<input type="hidden" name="id" value="12"></form>
The url where it points to has this code:
$narq=$id."-".$userfile_name;
copy($userfile,"../fotos/".$narq);
The $userfile_name gives me a value like "/tmp/php9AbQrg", and evry time I try again, it changes the letters after /tmp/php...
For that reason, php warns me the error: open_basedir restriction in effect. File is in wrong directory in /WWW....
What could it be? How can I solve it?