tags:

views:

71

answers:

1

I am able to upload a zip file and compress it, now i need the filename alone... but when i try to reach the name i get along with zip.

asas.text = "upload/" +fileRef.name + "/" +as.text;

Also How can i point the current viewing URL before the upload path.. something if

http://www.yahoo.com/upload/filename/ If the file is viewed from yahoo domain

+1  A: 

Use the basename function.

$fileName = basename('/path/to/file.zip'); // $fileName == 'file.zip';

I think you're asking for the server name? Using your example above:

echo $_SERVER['SERVER_NAME']; // prints "www.yahoo.com"
hobodave