Php url

in php… when i specify

move_uploaded_file($userfile[0], "/ft_files/1.jpg"

does php take that url respective to the folder where the php file is or does it take the url respective to the root of the server that is

/var/www/html/ or whaterver the url is ??

It takes the URL depending on the folder where the php file is…

(I’m pretty sure)

exactly, whenever using relative paths, they are always RELATIVE to the file that contains the URL. For example, if your *.php file is “” , and you linked like in this example

<? echo "<a href=otherfile.php>click</a>"; ?>

then the URL displayed would be “”.

i don’t understand why your using that code anyway… you only need to use the copy() function to upload the files…