Time of Update: 2017-01-13
Q:xdebug是什嗎?A:xdebug是一個開源的php調試器,以php模組的形式載入並被使用。上周發現xdebug出了RC(release candidate)2版了,就拿下來安裝了一下,順便寫了一個安裝手冊,希望對大家有用。linux xdebug模組和相關工具的安裝:測試環境:Ubuntu12.04+PHP 5.3.10 代碼如下複製代碼 # 擷取xdebug最新源碼包git clone git://github.com/derickr/xdebug.gitcd
Time of Update: 2017-01-13
本包裡有非安全執行緒與安全執行緒版本。eAccelerator_ts.dll 是安全執行緒版本,eAccelerator_nts.dll 是非安全執行緒版本。該eAccelerator使用最新發行的PHP 5.2.17編譯,使用前請確認自己的PHP版本。檔案內含Thread safe(安全執行緒)和Non Thread Safe(非安全執行緒版本),請根據自己使用的PHP版本選擇。一、相關下載eAccelerator 0.9.6.1 For
Time of Update: 2017-01-13
大多數企業網站都以提供使用者瀏覽內容的服務為主,較少需要使用者輸入,網站的建設目標應以提供資訊並且使之簡明、清晰、美觀為主;而如果企業網站同時提供線上購買,則需要安全,事務等更多目標;部落格或線上論壇每天都將產生大量的新資料,網站的建設目標則要考慮到內容的分類與品質評判,確保不同類別的優質內容可以展示給適當的讀者。無論是哪一種類型的網站,網站架構師都應考慮以下通用設計目標: 選用一種動態語言,即便網站只是展示靜態內容,它將協助您更好的完成其他目標 &
Time of Update: 2017-01-13
1,不做總長度判斷,長度判斷可以自己加上;2,支援.net.cn,.com.cn這樣的網域名稱尾碼;3,郵箱名部分以字母或者數字開頭,中間可以有“-”與“_”符號;4,網域名稱部分以字母或者數字開頭,中間可以有“-”與“_”符號; 代碼如下複製代碼 /** * 自己修整的一個郵箱Regex * 瓊台部落格 */echo '<meta
Time of Update: 2017-01-13
擷取所有圖片網址preg_match_all("/ src=("|'){0,}(http://(.+?))("|'|s|>)/is",$text,$img);匹配中文字元的Regex: [u4e00-u9fa5]匹配雙位元組字元(包括漢字在內):[^x00-xff]匹配空行的Regex:n[s| ]*r匹配HTML標記的Regex:/<(.*)>.*</1>|<(.*) />/匹配首尾空格的Regex:(^s*)|
Time of Update: 2017-01-13
[a-zA-Zxa0-xff_]小寫大寫英文,或者中文,或者底線開頭[0-9a-zA-Zxa0-xff_]後面的內容可以是小寫大寫中文數字底線[0-9a-zA-Zxa0-xff_]{3,15}後面的內容重複3-15次 所以整個Regex為[a-zA-Zxa0-xff_][0-9a-zA-Zxa0-xff_]{3,15}也可以加上開頭結尾錨記^[a-zA-Zxa0-xff_][0-9a-zA-Zxa0-xff_]{3,15}$ 代碼如下複製代碼
Time of Update: 2017-01-13
php 類的寫法//Db.class.phpclass Db { private $_dblink; public $result; public function __construct($host, $user, $password, $dbname, $charset = 'utf8') { try{
Time of Update: 2017-01-13
<?php$hostname = 'localhost';$dbname = 'test';$username = 'root';$pw = 'vivian';$sqlfile = 'gb.sql';$sql = file_get_contents($sqlfile);echo($dbname);echo($sql);$conn = mysql_connect($hostname,$username,$pw) or
Time of Update: 2017-01-13
function dftp_connect($ftphost, $ftpuser, $ftppass, $ftppath, $ftpport = 21, $ftpssl = 0, $silent = 0) { global $ftp; @set_time_limit(0); $ftphost = wipespecial($ftphost); $ftpport = intval($ftpport); $ftpssl =
Time of Update: 2017-01-13
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta
Time of Update: 2017-01-13
<?phpheader("Content-type: text/html;charset=GBK");//輸出編碼,避免中文亂碼$page=isset($_GET['page'])?intval($_GET['page']):1; //這句就是擷取page=18中的page的值,假如不存在page,那麼頁數就是1。$num=10; &
Time of Update: 2017-01-13
php ajax使用者註冊檢測代碼index.php 複製PHP內容到剪貼簿 PHP代碼:<tr> <td width="25%" class="altbg1"> 用 戶 名<font color="red">
Time of Update: 2017-01-13
<?php php 留言板防重新整理效果 $ip = $_SERVER['REMOTE_ADDR']; $conn = mysql_connect($mysql_server_name, $mysql_username,
Time of Update: 2017-01-13
php儲存遠程圖片,我這個系統是自己寫了,所以上傳圖片時相當麻痹了,我還用了新雲的一個系統,他那編輯器支援遠程儲存圖片功能,但那個是asp的而我的系統只支援php我想php可能比asp更容易實現這個功能吧,開始想到用file_get_contents(),然後用fopen儲存file_get_content取得的內容就OK了,下面是我實現的一個小程式.<?php$filed="yun_qi_img/conference_php_quebec.gif";$datad=fi
Time of Update: 2017-01-13
php類的使用執行個體教程<?php/** * Class program for yinghua05-2 * designer :songsong */class Template { var $tpl_vars; var $tpl_path; var $_debug; /** * Construct for Template * PHP5 or upper
Time of Update: 2017-01-13
php熱門檔案上傳類<?php/** * flie class * (jpg,gif,png) */class Upload { var $_file; var $_fileType; var $target = 'upload/'; /** * construct for this class * * @param string $name *
Time of Update: 2017-01-13
php使用者密碼修改代碼<?php @session_start(); require_once("../inc/ring_admin.php"); require_once("../../inc/connect.php"); require_once("../../admin/inc/function.php"); ring_login(); $pwd =
Time of Update: 2017-01-13
php實現編碼的轉換,這裡會把gb2312轉換成utf-8function gb2utf8($gb) { if( !trim($gb) ) return $gb; $utf8=''; while($gb) { if( ord(substr($gb,0,1)) > 127 )
Time of Update: 2017-01-13
<?phpsession_start();# 取得隨機字元function getRandStr($length = 4, $mode = 1){ $str1 = '123456789'; $str2 = 'abcdefghijklmnopqrstuvwxyz'; $str3 = 'ABCDEFGHIJKLMNPQRSTUVWXYZ'; $str4 = '_'; $str5 =
Time of Update: 2017-01-13
<html> <head> <meta http-equiv="Content-Type" content="text/html;charset=gb2312"/>