You are here: Re: Special Search « All PHP « IT news, forums, messages
Re: Special Search

Posted by serkanhamarat@gmail.com on 11/02/06 23:24

Hope I understood and it helps;
1st STEP:
You need a recursive function for subdirectory handling.
recursive function means "a function calls himself" in a loop.
usually an infinite loop but not here. search for similar algorythims
to handle every subdirectories one by one.
"
function recursive_func($basedir) {
$handle =opendir($basedir);
while ($file = readdir($handle)) {
do your compare and other stuff here;
if (is_dir($file)) {
recursive_func($file);
}
}
}

2nd STEP:
use a regular expression for keyword search in file names for
comparison.
use like ereg() or eregi() functions. they explained in references.
"if (ereg("key", $filename)) { print "<a>form your URL here</a>"; }"
esarch better examples.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация