phpÃæÊÔÌ⸽´ð°¸¶þ
1¡¢ÈçºÎʵÏÖ×Ö·û´®·×ª£¿
<?php
function getStr($str){
$len=strlen($str);
for ($i=0;$i<$len/2;$i++){
$temp=$str[$i];
$str[$i]=$str[$len-$i-1];
$str[$len-$i-1]=$temp;
}
return $str;
}
echo getStr("abcdef");
?>
2¡¢apache+mysql+phpʵÏÖ×î´ó¸ºÔصķ½·¨£¿
¸öÈ˹۵㣺Ö÷ÒªÊÇ¿´ApacheºÍmysqlµÄ¸ºÔØ¡£
ApacheµÄ¸ºÔؾùºâÖ÷Òª¹é¹¦ÓÚ mod_proxy Õâ¸öÄ£¿é¡£ Ò»°ãÀ´Ëµ£¬¸ºÔؾùºâ¾ÍÊǽ«¿Í»§¶ËµÄÇëÇó·ÖÁ÷¸øºó¶ËµÄ¸÷¸öÕæʵ·þÎñÆ÷£¬´ïµ½¸ºÔؾùºâµÄÄ¿µÄ¡£»¹ÓÐÒ»ÖÖ·½Ê½ÊÇÓÃÁ½Ì¨·þÎñÆ÷£¬Ò»Ì¨×÷ΪÖ÷·þÎñÆ÷(Master)£¬Áíһ̨×÷ΪÈȱ¸·Ý(Hot Standby)£¬ÇëÇóÈ«²¿·Ö¸øÖ÷·þÎñÆ÷£¬ÔÚÖ÷·þÎñÆ÷µ±»úʱ£¬Á¢¼´Çл»µ½±¸·Ý·þÎñÆ÷£¬ÒÔÌá¸ßϵͳµÄÕûÌå¿É¿¿ÐÔ¡£
mysqlµÄ¸ºÔؾùºâÔÝʱûÓÐÑо¿
3¡¢¶ÔÓÚ´óÁ÷Á¿µÄÍøÕ¾,Äú²ÉÓÃʲôÑùµÄ·½·¨À´½â¾ö·ÃÎÊÁ¿ÎÊÌ⣿
µÚÒ»£¬È·ÈÏ·þÎñÆ÷Ó²¼þÊÇ·ñ×ã¹»Ö§³Öµ±Ç°µÄÁ÷Á¿¡£
µÚ¶þ£¬ÓÅ»¯Êý¾Ý¿â·ÃÎÊ¡£
µÚÈý£¬½ûÖ¹ÍⲿµÄµÁÁ´¡£
µÚËÄ£¬¿ØÖÆ´óÎļþµÄÏÂÔØ¡£
µÚÎ壬ʹÓò»Í¬Ö÷»ú·ÖÁ÷Ö÷ÒªÁ÷Á¿
µÚÁù£¬Ê¹ÓÃÁ÷Á¿·ÖÎöͳ¼ÆÈí¼þ¡£
4¡¢$str1 = null;
$str2 = false;
echo $str1==$str2 ? 'ÏàµÈ' : '²»ÏàµÈ';
ÏàµÈ
$str3 = '';
$str4 = 0;
echo $str3==$str4 ? 'ÏàµÈ' : '²»ÏàµÈ';
ÏàµÈ
$str5 = 0;
$str6 = '0';
echo $str5===$str6 ? 'ÏàµÈ' : '²»ÏàµÈ';
²»ÏàµÈ
echo '<br/>';
$a1 = null;
$a2 = false;
$a3 = 0;
$a4 = '';
$a5 = '0';
$a6 = 'null';
$a7 = array();
$a8 = array(array());
echo empty($a1) ? 'true' : 'false';
echo empty($a2) ? 'true' : 'false';
echo empty($a3) ? 'true' : 'false';
echo empty($a4) ? 'true' : 'false';
echo empty($a5) ? 'true' : 'false';
echo empty($a6) ? 'true' : 'false';
echo empty($a7) ? 'true' : 'false';
echo empty($a8) ? 'tru
Ïà¹ØÎĵµ£º
ÔÚPHPÖÐʹÓùýSESSIONµÄÅóÓÑ¿ÉÄÜ»áÅöµ½Õâôһ¸öÎÊÌ⣬ÔÚijЩ¿Í»§¶ËµçÄÔÉÏSESSION±äÁ¿²»ÄÜ¿çÒ³´«µÝ¡£ÕâÁîÎÒ¿àÄÕÁ˺ÃЩÈÕ×Ó£¬×îÖÕͨ¹ý²é×ÊÁÏ˼¿¼²¢½â¾öÁËÕâ¸öÎÊÌâ¡£ÎÒÈÏΪ£¬³öÏÖÕâ¸öÎÊÌâµÄÔÒòÓÐÒÔϼ¸µã£º
1¡¢¿Í»§¶Ë½ûÓÃÁËcookie
2¡¢ä¯ÀÀÆ÷³öÏÖÎÊÌ⣬ÔÝʱÎÞ·¨´æÈ¡cookie
3¡¢php.iniÖеÄsession.use_trans_sid = 0»òÕß±àÒë ......
תÔصÄPHPÃæÊÔÌâ
1. »ù±¾ÖªÊ¶µã
HTTPÐÒéÖм¸¸ö״̬ÂëµÄº¬Òå:503 500 401 200 301 302¡£¡£¡£
Include require include_once require_once µÄÇø±ð.
PHP/MysqlÖм¸¸ö°æ±¾µÄ½ø»¯Ê·£¬±ÈÈçmysql4.0µ½4.1£¬PHP 4.xµ½5.1µÄÖØ´ó¸Ä½øµÈµÈ¡£
HEREDOC½éÉÜ
д³öһЩphpħ»Ã·½·¨;
һЩ±àÒëphpʱµÄconfigure ²ÎÊý
Ïòphp´«Èë ......
PHP5.2.4֮ǰµÄ°æ±¾ÎÞÐèÉèÖÃʱÇø¡£ÏÂÃæÊÇÐÞ¸ÄPHPʱÇøµÄÈý¸ö°ì·¨¡£
1¡¢ÐÞ¸ÄPHP.iniÕâ¸öÎļþ
ÕÒµ½date.timezoneÕâÐУ¬È¥µôÇ°ÃæµÄ·ÖºÅ£¬¸Ä³É£º date.timezone = Asia/Shanghai 2¡¢ÐÞ¸Ä .htaccessÎļþ
ÐÞ¸Ä.htaccessÎļþÓÐÁ½ÖÖ°ì·¨£¬ÏÂÃæµÄÁ½ÌõÓï¾äÖ»ÒªÓÐÒ»Ìõ¼´¿É php_value date.timezone Asia/Shanghai
......
http://www.oracle.com/technology/global/cn/pub/notes/technote_php_instant.html
Ϊ Linux ºÍ Windows °²×° PHP ºÍ Oracle 10g Instant Client
×÷ÕߣºChristopher Jones£¬¼×¹ÇÎĹ«Ë¾µÄ×Éѯ¼¼ÊõÈËÔ±
·¢²¼ÈÕÆÚ£º2004 Äê 12 ÔÂ
Oracle 10g Instant Client£¨Ãâ·ÑÏÂÔØ£©ÊÇPHP ÓëÔ¶³Ì Oracle Êý¾Ý¿âÁ¬½ÓµÄ×î¼òµ¥·½Ê½£¬Ëü ......
¡¡¡¡ËµÊµÔڵģ¬ÏÖÔÚµÄweb¿ª·¢È·ÊµºÜ»ð£¬µ«×ܾõµÃ¶ÔÎÒÀ´ËµÃ»ÓÐʲôÎüÒýÁ¦¡£Ëµµ½µ×£¬²»¹ýÊÇ×ö¸öÍøÕ¾ÂÓÐʲôÒâ˼£¿¾ÍËã×ö¸öÌÔ±¦Íø£¬ËãºÜÅ£ÁË°É£¬ÄÇÓÖÔõôÑù£¬²»¹ý¾ÍÊÇʵÏÖһЩ½»»¥²Ù×÷µÄÍøÕ¾°ÕÁË£¬×ܾõµÃ£¬Ã»Óж¯Á¦¡£
¡¡¡¡Æäʵ£¬´ÓÄÚÐÄÉî´¦£¬»¹ÊǾõµÃ×öÓÎÏ·ºÜÓÐÒâ˼¡£ÍæÓÎÏ·¸üÓÐÒâ˼£¬×ö³öƯÁÁµÄÓÎϷЧ¹û²ÅÊǷdz£Ë§µÄ¡£¾¡¹ ......