How to get the url of file uploaded php?

DubStylee

New member
Hello,

How do I get the URL of the file uploaded into a SQL database? I use PHP to process the file thats being uploaded..

instead of: ../myads/user/image.jpg
I would like : http://websitename.com/myads/user/image.php

Thanks

My Code:
$target = '/myads/user/'.$row['username'];
if(!is_dir($target)) @mkdir($target);
$target = $target . '/progress';
if(!is_dir($target)) @mkdir($target);

$path1= $target."/".$_FILES['ufile']['name'][0];
copy($_FILES['ufile']['tmp_name'][0], $path1);
 
Back
Top