- 论坛徽章:
- 1
|
blackold 发表于 2014-09-18 11:21 ![]()
回复 1# iocg perl ...
php- [root@localhost ~]# php test.php
- Through 2012, Moher Been Recently Given The Name Fundraising Govt Of The Season
- Because Of The Group Of Fundraising Professional People
- Caused The Conservancy's Prime City Advertising Drawer In Leading The Salvaging
- Any Cattached Toservancy's Souls Intent Is Without A Doubt Preserving Providers
- In Our Natural Regional Site Five(Collier, Shelter, Hendry
- Section Possesses Biologists Is Usually Masters Affecting Underwater Turtles
- [root@localhost ~]# cat file1
- Through 2012, Moher Been Recently Given The Name Fundraising Govt Of The Season
- Because Of The Group Of Fundraising Professional People
- Everglades Segment. He Been Recently The Online Office Managers Individual
- Caused The Conservancy's Prime City Advertising Drawer In Leading The Salvaging
- South West New York $38.8 Million Investment Campaign One Of Number
- One Plans From Carried Out Nation Collier.Were You Aware Zero Per Cent Of Money
- Bequeathed Into Your Conservancy Of South West New York Is Still Locally.
- Any Cattached Toservancy's Souls Intent Is Without A Doubt Preserving Providers
- In Our Natural Regional Site Five(Collier, Shelter, Hendry
- Charlotte Now As Hell As, Glades).Generally Conservancy's Nutrition
- Section Possesses Biologists Is Usually Masters Affecting Underwater Turtles
- Panthers And Mangroves As Well As Have Always Proficiency In Making Comparisons
- For The Achievements Of Mangrove Repair.This Conservancy Road
- Crews Campaign Towards Western European Everglades Clean Up
- Confronted Variety Resource Efficiency, Smartly Expansion As Well As Water Class.
- [root@localhost ~]# cat test
- test test.php test.sh test.txt.zip test.vim
- [root@localhost ~]# cat test.php
- <?php
- error_reporting(0);
- $pattern = array(
- '/Now/',
- '/We/',
- '/ment/',
- );
- $fp = fopen("file1","r") or die("no file1 to open\n");
- while(! feof($fp))
- {
- $str = fgets($fp);
- $res = preg_replace($pattern, "", $str);
- if($res == $str)echo $str ;
- }
- fclose($fp);
- [root@localhost ~]#
复制代码 |
|