After following, you can keep track of his dynamic information in a timely manner
Courses in the relevant section:Form validation for newbies to PHP
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)){ $emailErr = "非法郵箱格式"; }
2016-12-020個(gè)贊
Courses in the relevant section:Required and optional fields of forms for beginners to PHP
if (empty($_POST["website"])) { $website = ""; } else { $website = test_input($_POST["website"]); }
2016-12-020個(gè)贊
Courses in the relevant section:Getting Started with PHP - Verification Email and URL
$website = test_input($_POST["website"]); if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",$website)) { $websiteErr = "非法的 URL 的地址"; }
2016-12-020個(gè)贊
Courses in the relevant section:Getting Started with PHP: $_GET and $_POST
表單的method寫的是get,我們獲取表單信息的時(shí)候就要用get方式獲取
2016-12-020個(gè)贊
Courses in the relevant section:PHP Beginner's Introduction to Multidimensional Arrays
二維數(shù)組 array( array(1,2,3), array(1,2,3) )
2016-12-020個(gè)贊
Courses in the relevant section:Date function for beginners in PHP
date(format,timestamp) 第一個(gè)參數(shù)是規(guī)定日期的格式 第二個(gè)參數(shù)默認(rèn)是當(dāng)前的日期和時(shí)間
2016-12-020個(gè)贊
Courses in the relevant section:Introduction to PHP
require 生成一個(gè)致命錯(cuò)誤(E_COMPILE_ERROR),在錯(cuò)誤發(fā)生后腳本會停止執(zhí)行。 include 生成一個(gè)警告(E_WARNING),在錯(cuò)誤發(fā)生后腳本會繼續(xù)執(zhí)行。
2016-12-020個(gè)贊
Courses in the relevant section:File processing for beginners in PHP
r 只讀。在文件的開頭開始。 r+ 讀/寫。在文件的開頭開始。 w 只寫。打開并清空文件的內(nèi)容;如果文件不存在,則創(chuàng)建新文件。 w+ 讀/寫。打開并清空文件的內(nèi)容;如果文件不存在,則創(chuàng)建新文件。 a 追加。打開并向文件末尾進(jìn)行寫操作,如果文件不存在,則創(chuàng)建新文件。 a+ 讀/追加。通過向文件末尾寫內(nèi)容,來保持文件內(nèi)容。 x 只寫。創(chuàng)建新文件。如果文件已存在,則返回 FALSE 和一個(gè)錯(cuò)誤。 x+ 讀/寫。創(chuàng)建新文件。如果文件已存在,則返回 FALSE 和一個(gè)錯(cuò)誤。
2016-12-020個(gè)贊
Courses in the relevant section:PHP Beginner's Guide to Cookies
cookie 是一種服務(wù)器留在用戶計(jì)算機(jī)上的小文件。每當(dāng)同一臺計(jì)算機(jī)通過瀏覽器請求頁面時(shí),這臺計(jì)算機(jī)將會發(fā)送 cookie。
2016-12-020個(gè)贊
Courses in the relevant section:PHP session for beginners
session_start(); 開啟session session_distroy();銷毀session
2016-12-020個(gè)贊
Courses in the relevant section:File upload for beginners in PHP
上傳文件 在表單中藥加入enctype="multipart/form-data" 使用$_FILES 獲取上傳文件信息,對其進(jìn)行判斷處理,error為0時(shí),上傳成功
2016-12-020個(gè)贊
Courses in the relevant section:PHP Beginner's Introduction to Email
mail(to,subject,message,headers,parameters) to 必需。規(guī)定 email 接收者 subject 必需。規(guī)定 email 的主題。注釋:該參數(shù)不能包含任何新行字符 message 必需。定義要發(fā)送的消息。應(yīng)使用 LF (\n) 來分隔各行。每行應(yīng)該限制在 70 個(gè)字符內(nèi) headers 可選。規(guī)定附加的標(biāo)題,比如 From、Cc 和 Bcc。應(yīng)當(dāng)使用 CRLF (\r\n) 分隔附加的標(biāo)題 parameters 可選。對郵件發(fā)送程序規(guī)定額外的參數(shù)
2016-12-020個(gè)贊
Courses in the relevant section:PHP Beginner's Introduction to Email Injection
FILTER_SANITIZE_EMAIL 過濾器從字符串中刪除電子郵件的非法字符 FILTER_VALIDATE_EMAIL 過濾器驗(yàn)證電子郵件地址的值
2016-12-020個(gè)贊
Courses in the relevant section:Error handling for beginners in PHP
error_function(error_level,error_message,error_file,error_line,error_context) error_level 必需。為用戶定義的錯(cuò)誤規(guī)定錯(cuò)誤報(bào)告級別。必須是一個(gè)數(shù)字。參見下面的表格:錯(cuò)誤報(bào)告級別 error_message 必需。為用戶定義的錯(cuò)誤規(guī)定錯(cuò)誤消息 error_file 可選。規(guī)定錯(cuò)誤發(fā)生的文件名 error_line 可選。規(guī)定錯(cuò)誤發(fā)生的行號。 error_context 可選。規(guī)定一個(gè)數(shù)組,包含了當(dāng)錯(cuò)誤發(fā)生時(shí)
2016-12-020個(gè)贊
Courses in the relevant section:Exception handling for beginners in PHP
Try - 使用異常的函數(shù)應(yīng)該位于 "try"代碼塊內(nèi)。如果沒有觸發(fā)異常,則代碼將照常繼續(xù)執(zhí)行。但是如果異常被觸發(fā),會拋出一個(gè)異常 Throw - 里規(guī)定如何觸發(fā)異常。每一個(gè) "throw" 必須對應(yīng)至少一個(gè) "catch" Catch - "catch" 代碼塊會捕獲異常,并創(chuàng)建一個(gè)包含異常信息的對象
2016-12-020個(gè)贊