PHP read and write to file.

18.6.2017 121 views ;)

Dedicated this video:

I saw video about Perl read and write file, and want to create hollywar..
Why use Perl for this simple operation for 20 lines of code.

PHP looks better:

$in = file_get_contents(‘file.txt’);
$in = str_replace(“you”, “YOU”, $in);
file_put_contents(‘file.txt’,$in);

Only 3 lines do the same !
It’s simpler and understandable !
Easy to use !

Yes I love Perl regex and PHP сфт иу дшлу ершы цшер Perl syntax:

$in = file_get_contents(‘file.txt’);
$in =~/you/YOU/;
file_put_contents(‘file.txt’,$in);

Thats cool, but not work.. )

Thanks nisha yadav for your Perl pod ! ))


Last 5 records:

   


Smileys
Timer
Chat roulette
Virus Detector
Calculator
Vibrator
Check domain for available
Random number generator
Referral link gen
Detector external links
Math questions
Online piano
Today: 2017.08.20