Hello, I'm hoping someone can help me as I' new to this and can't figure it out myself.
PHP4.20 Win32 I'm trying to seach for a string that would occur about 10 lines into a text file. I don't want to search the entire file, and I just want to know if the string exsists or not, but I don't really know what I'm doing. This is what I was trying, it occurs inside a loop that is listing the files in a directory. $fp = fopen("$target_filename", "r"); $contents = fgets("$fp","4096"); if(strstr("$contents", "$search_str")) { echo "<pre>"; readfile("$target_filename"); echo "</pre>"; } Thanks Tim Loepp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php