Getting just a filename from upload
Posted: Fri Jul 26, 2002 10:26 am
Hi,
Again I'm working on my small joke DB, and for every thing i figure out, i realize that there is twice as much i don't understand.
But, I'm getting closer..
I have managed to implement:
http://www.zend.com/zend/spotlight/uploading.php
It now accepts uploads, and everything i registered in my mySQL DB.
It add the record, and my "show_joke.php" page, checks if there is an Image attached, and displays it, if no picture is included, it jumps to the next part of the script.
What I can't figure out is how to get the filename only (using the abowe script/link). It saves the 'real' path in my mySQL (E.g: /var/www/html/xxx/upload/945.gif).
Is there a way i can remove the path, and only include the filename when i store it to the DB?
Hope this made sense...
Best regards, Spear
Again I'm working on my small joke DB, and for every thing i figure out, i realize that there is twice as much i don't understand.
But, I'm getting closer..
I have managed to implement:
http://www.zend.com/zend/spotlight/uploading.php
It now accepts uploads, and everything i registered in my mySQL DB.
It add the record, and my "show_joke.php" page, checks if there is an Image attached, and displays it, if no picture is included, it jumps to the next part of the script.
What I can't figure out is how to get the filename only (using the abowe script/link). It saves the 'real' path in my mySQL (E.g: /var/www/html/xxx/upload/945.gif).
Is there a way i can remove the path, and only include the filename when i store it to the DB?
Hope this made sense...
Best regards, Spear