PDA

View Full Version : php url



jazzman121
September 2nd, 2003, 12:59 PM
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 ??

andr.in
September 2nd, 2003, 01:42 PM
It takes the URL depending on the folder where the php file is...

(I'm pretty sure)

awligon
September 3rd, 2003, 12:40 AM
exactly, whenever using relative paths, they are always RELATIVE to the file that contains the URL. For example, if your *.php file is "http://www.host.com/subdir/file.php" , and you linked like in this example
<? echo "<a href=otherfile.php>click</a>"; ?> then the URL displayed would be "http://www.host.com/subdir/otherfile.php".

Jubba
September 4th, 2003, 03:30 PM
i don't understand why your using that code anyway... you only need to use the copy() function to upload the files...