hi,
I am a new member of daniwab. Pl, help me. Just i want php codings to search images in a folder(including subfolders) in my drive. Search is just like windows search program.
But i want to search images without using database. Just i type any code word (for eg:- fruits) in the search box, then it will displays all the fruits in my folder(including subfolders)
ashafaaiz
0
Newbie Poster
Recommended Answers
Jump to Post<?php function isImage($fileName) { $ext = substr(strrchr($fileName, '.'), 1); if($ext <> "") { $ext = strtolower($ext); switch($ext) { case 'gif': return true; case 'jpeg': return true; case 'png': return true; case 'psd': return true; case 'bmp': return true; case 'tiff': return true; case 'jp2': return true; case …
Jump to Posttry this code....
$cnt = 1; $number_of_image_per_row = 6; $width = 50; //Define image width $height = 50 //Define image height foreach(ListMyFiles('includes/',$MySearchFile) as $file_name) { if($cnt % $number_of_image_per_row == 0) echo "<br>"; echo "<image src='".$file_name."' $width $height >"; $cnt++; }
All 8 Replies
Aamit
-7
Posting Whiz
ashafaaiz
0
Newbie Poster
Aamit
-7
Posting Whiz
ashafaaiz
0
Newbie Poster
Aamit
-7
Posting Whiz
manish.s
0
Light Poster
ashafaaiz
0
Newbie Poster
manish.s
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.