View Single Post
Old 10-26-2007, 08:25 AM   #1 (permalink)
meshi
The Contributor
Upcoming Programmer 
 
meshi's Avatar
 
Join Date: Oct 2007
Posts: 44
Thanks: 0
meshi is on a distinguished road
Smile how to search the content of txt file

[code]input type="text" name="keyword"><input type="submit" name="search" value="Search>[code]


PHP Code:
$sql=mysql_query("select * from myfile");
while (
$row=mysql_fetch_array($sql))
{

$file_handle fopen("$row[path]""r");
fclose($file_handle);


if i have a file in my database george.txt and totz.txt
george.txt content:

a b c d e f g h i j k l m n o p q r s t u v w x y z

totz.txt content:

one two three four five six seven eight nine ten

if i enter the word one in the input box and then click search, the display should be totz.txt. how would i do to make that posible..please give me an example
meshi is offline  
Reply With Quote