/ Published in: PHP
URL: http://superpixel.ch/projects/imageload/
Expand |
Embed | Plain Text
$folder = opendir("."); // Use 'opendir(".")' if the PHP file is in the same folder as your images. Or set a relative path 'opendir("../path/to/folder")'. { } }
Comments
Subscribe to comments
You need to login to post a comment.

Using strpos to find the extension can lead to bugs if you have a filename similar to "myimage.2010.png" because that will return "2010" instead of "png".
It's better to use this:
Would the php glob function be of better use here?
`glob ('/path/to/directory/' . '*.{jpg,jpeg,gif, png}', GLOB_BRACE)'
Would the php glob function be of better use here?
`glob ('/path/to/directory/' . '*.{jpg,jpeg,gif, png}', GLOB_BRACE)'
Hi i have this script that allows me to upload jpg or gif files onto mysql database , but, i couldn`t get my script right to show the uploaded photos on the browser. So, please i would want someone to tell me what is wrong we my output script below and probably correct it for me.
Thanks John Mbachu [email protected] +2348021171733.
MY WELL WORKING CODE.
(image_upload.php)
Upload Page
See all files