PHP Security Consortium[31-Jan-2005] An international group of PHP experts today announced the official launch of the PHP Security Consortium (PHPSC), a group whose mission is to promote secure programming practices within the PHP community through
PHP自從5.3後新增PHAR歸檔,Phar 歸檔的概念來自 Java? 技術的 JAR 歸檔,它允許使用單個檔案打包應用程式,這個檔案中包含運行應用程式所需的所有東西。該檔案不同於單個可執行檔,後者通常由程式設計語言產生,比如 C,因為該檔案實際上是一個歸檔檔案而非編譯過的應用程式。因此 JAR 檔案實際上包含組成應用程式的檔案,但是考慮到安全性,不對這些檔案進行仔細區分。Phar 擴充正是基於類似的理念,但是在設計時主要針對 PHP 的 Web 環境。同樣,與 JAR
開啟檔案:fopen:fopen(filename,mode);//fopen("test.txt","r”);開啟模式:r 唯讀方式開啟,將檔案指標指向檔案頭 r+ 讀寫方式開啟,將檔案指標指向檔案頭 w 寫入方式,指向檔案頭,如果不存在則嘗試建立 w+ 讀寫方式,指向檔案頭,如果不存在則嘗試建立 a 寫入方式開啟,指向檔案末尾,如果不存在則嘗試建立
str_replace(PHP 4, PHP 5)str_replace — Replace all occurrences of the search string with the replacement stringDescriptionmixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )This function returns a string or an
foreach(PHP 4, PHP 5)The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable.