Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. $myFile = file_get_contents("./file.txt");
  4. $myTempFile = "./temp.txt";
  5. $fh = fopen($myTempFile,'r');
  6. $key = (fgets($fh));//Save first line content
  7.  
  8.  
  9.  
  10.  
  11. echo "$myFilen"; // this returns "Stuff abab"
  12. echo "$keyn"; //this returns "abab"
  13. if(strpos($myFile, $key)!== FALSE) //This does not work
  14. {
  15.  
  16. //stuff
  17.  
  18. }
  19.  
  20. }
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement