Jump to content


Ereg() with files?

  • Please log in to reply
1 reply to this topic

#1 JP128

  • Members
  • PipPipPip
  • Advanced Member
  • 233 posts
  • LocationWisconsin

Posted 08 June 2006 - 04:05 PM

How can I search a file to see if it has a string? I know I need to use ereg($string, $filecontents); but every time I try to search it, it returns false. If someone can help me that would be great.
John Ensign - Age 16 - PHP Learner

My email is Johnny.Ensign@gmail.com

#2 Kris

  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 08 June 2006 - 07:43 PM

Could you post up your code?

Just to point out though, before seeing your code, you are dumping the contents of the file into a variable, and then using that as the haystack in your ereg() right?

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users