1 / 4

(第 16 讲) PHP 小偷程序原理和实例

(第 16 讲) PHP 小偷程序原理和实例. 本讲知识点. 1 、初识正则表达式 2 、正则表达式函数 ereg() eregi() 3 、 file_get_contents 读取整个文件函数 4 、写一个天气预报小偷的程序. (第 16 讲) PHP 小偷程序原理和实例. 1 、初识正则表达式. ^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+. 用于描述字符排列和匹配模式的一种语法规则。它主要用于字符串的模式分割 、匹配、查找及替换操作。. (.*). . 匹配除换行符.

angus
Download Presentation

(第 16 讲) PHP 小偷程序原理和实例

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. (第16讲)PHP小偷程序原理和实例 本讲知识点 1、初识正则表达式 2、正则表达式函数 ereg() eregi() 3、file_get_contents 读取整个文件函数 4、写一个天气预报小偷的程序

  2. (第16讲)PHP小偷程序原理和实例 1、初识正则表达式 ^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+ 用于描述字符排列和匹配模式的一种语法规则。它主要用于字符串的模式分割 、匹配、查找及替换操作。 (.*) . 匹配除换行符 ( )开始和结束位置 *匹配1个或多个任意字符

  3. (第16讲)PHP小偷程序原理和实例 2、正则表达式函数 ereg() eregi() ereg(正则表达式, 内容, 返回的数组); 若省略参数返回的数组,找到则返回值为 True否则 返回 False ereg()有区分大小写,eregi()无区分大小写。 if (ereg("^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+",$email)) { echo "您的 E-Mail 通过初步检查"; } 3、file_get_contents 读取整个文件函数 $rf = fopen ('doc.txt',r ); file_get_contents($rf); $rf = fopen ('doc.txt',r ); fread ($rf ,filesize ('doc.txt')); 等价于

  4. (第16讲)PHP小偷程序原理和实例 写一个天气预报小偷的程序 实例操作演示

More Related