PHP File Operation -


i trying create text file php in fopen("test.txt","a"). have tried fopen("test.txt","w+").

the text file created want check string in test.text, exist or in test.txt not create duplicate entry. can me out?

use code:

$content = file_get_contents('test.txt'); if (str_pos('your keyword', $content) !== false){ // keyword exists in file } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -