Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

phpµÄÅäÖú¯Êý

phpµÄÅäÖú¯Êý¾ÍÊǼ¸¸öini_*µÄº¯Êý£¬Ö÷ÒªÊÇÕë¶ÔÅäÖÃÎļþµÄ²Ù×÷£¬Æäʵ¾ÍËĸöº¯Êý£ºini_get¡¢ini_set¡¢ini_get_all¡¢ini_restore¡£¸öÈ˸оõ×îÓÐÓõľÍÊÇini_setºÍini_get¡£
* ini_get()£º»ñÈ¡ÅäÖÃÎļþµÄÑ¡ÏîÖµ
Õâ¸öº¯ÊýÏàÐźܶàÈ˶¼Ê¹¹ý£¬¾ÍÊÇ»ñÈ¡ÅäÖÃÎļþÖÐijһ¸öÑ¡ÏîµÄÖµ£¬Èç¹ûÊÇÈ«Ó°È˲ÅÍøtrueÖµ¾Í·µ»Ø1£¬Èç¹ûÊÇfalseÖµ¾Í·µ»Ø0£¬×Ö·û´®¾Í·µ»Ø×Ö·û´®¡£
±ÈÈçÊÖ²áÖеÄÀý×Ó£º
£¼?php
/*
Our php.ini contains the following settings:
display_errors = On
register_globals = Off
post_max_size = 8M
*/
echo 'display_errors = ' . ini_get('display_errors') . "\n"; //ÏÔʾ´íÎóÊÇ·ñ´ò¿ª
echo 'register_globals = ' . ini_get('register_globals') . "\n";//È«¾Ö±äÁ¿ÊÇ·ñ´ò¿ª
echo 'post_max_size = ' . ini_get('post_max_size') . "\n";//×î¶àÄÜÌá½»µÄÎļþ´óС
echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . "\n";
?£¾
Êä³ö£º
display_errors = 1
register_globals = 0
post_max_size = 8M
post_max_size+1 = 9
Õâ¸öº¯ÊýÖ÷ÒªÊÇΪÁË»ñÈ¡ÅäÖÃÎļþ£¬¿ÉÒÔ·½±ãÄãºÜ¶à²Ù×÷¡£±ÈÈ«Ó°È˲ÅÍøÈçÄãÏë²Ù×÷×Ö·û´®¹ýÂË£¬µ«ÊÇÓÖ²»Çå³þmagic_quotes_gpcÓÐûÓдò¿ª£¬ËùÒÔÄã¾Í¿ÉÒÔÕâÑùдһ¸öº¯Êý£º
/* ×Ö·û´®¹ýÂ˺¯Êý */
function stringFilter($str)
{
if (ini_get('magic_quotes_gpc)') {
return $str;
} else {
return addslashes($str);
}
}
µ±È»£¬Èç¹ûÄãÎÞ·¨ÖªµÀÄãµÄÈ«¾Ö±äÁ¿ÊÇ·ñ´ò¿ª£¬Ò²¿ÉÒÔ¶¨ÖÆÕâÑùµÄº¯Êý£º
/* ±äÁ¿¼ì²âº¯Êý */
function getGetVar($var)
{
if (ini_set('register_gobals')) {
return $var;
} else {
return $_GET['var'];
}
}
È«Ó°È˲ÅÍøhttp://hr.qgyinglou.com/
µ±È»£¬Äã¿ÉÒÔ×öºÜ¶àÓÃ;£¬×Ô¼ºÂýÂýÌå»á¡£
* ini_setº¯Êý£ºÉèÖÃphp.iniÖеÄijЩ±äÁ¿Öµ
Õâ¸öº¯ÊýÊÇÉèÖÃÑ¡ÏîÖеÄÖµ£¬ÔÚÖ´Ðк¯ÊýºóÉúЧ£¬½Å±¾½áÊøµÄʱºò£¬Õâ¸öÉèÖÃҲʧЧ¡£²»ÊÇËùÓеÄÑ¡ÏÄܱ»¸Äº¯ÊýÉèÖõġ£¾ßÌåÄÇЩֵÄܹ»ÉèÖ㬿ÉÒԲ鿴ÊÖ²áÖеÄÁÐ±í¡£
¾ÍÊÇÄܹ»ÉèÖÃphp.iniÖеÄÑ¡ÏîÖµ±ÈÈ磬display_errorÑ¡Ïî¹Ø±ÕÁË£¬µ«ÊÇÄãÒªÏÔʾ³ÌÐòÖеĴíÎóÐÅÏ¢£¬·½±ãÄãµ÷ÊÔ³ÌÐò£¬ÄÇô¾Í¿ÉÒÔʹÓÃÕâ¸öº¯Êý£º
ini_set("display_errors", "On");
ÄÇôÔÚÄãÕâ¸öÒ³ÃæµÄ³ÌÐò¶¼»áÏÔʾ´íÎóÐÅÏ¢ÁË£¬¶øÇÒÄ㻹¿ÉÒÔʹÓÃerror_reportingÀ´ÉèÖÃÏÔʾµÄ´íÎóÐÅÏ¢¼¶±ð¡£
Èç¹ûÄãÐèÒªÔö¼Ó½Å±¾Ö´ÐÐʱ¼ä£¬ÄÇô¿ÉÒÔ


Ïà¹ØÎĵµ£º

±àÒëphpÖ§³ÖcurlºÍpdo_mysql

°²×°curl
¡¡¡¡
¡¡¡¡
¡¡¡¡1. curl ÊÇ php 標準庫,ËùÒÔ¿ÉÒÔÔÚÔ­來µÄ phpX.X.X.tar.gz ÖÐÕÒµ½¡£
¡¡¡¡2. 進Èë php Ä¿錄ÖÐµÄ ext ÕÒµ½ curl
¡¡¡¡3. ÔÚ curl Ä¿錄ÖÐ執ÐÐ /usr/local/php5-fastcgi/bin/phpize
¡¡¡¡4. ÔÙ來將ËûÉú³ÉµÄ檔°¸進ÐÐ ./con ......

php includeÎļþºó¶à³öÒ»¿Õ°×ÐÐ

ÓöàÖֱ༭Èí¼þÐ޸ĹýµÄphpÍøÕ¾¿ÉÄÜ»áÓöµ½Ò»ºÜ¹ÖÎÊÌ⣺ÓÃincludeÒýÈëµÄfooterºÍheaderÎļþ¶¼ÔÚÉÏÃæ¶à³öÒ»¿Õ°×ÐУ¬Ö±½Ó°Ñ±»ÒýÈëµÄÎļþ·ÅÈëÔòûÎÊÌâ¡£Õâ¸öÎÊÌ⼫ÓпÉÄÜÊDZàÂëÎÊÌâÒýÆðµÄ¡£Èç¹û²ÉÓÃutf-8±àÂëÒªÉèÖÃΪÎÞbom£¬²¢ÇÒÒªËùÓеÄÉæ¼°µ½µÄÒ³Ãæ°üÀ¨css¼°ÆäËûÎļþ¶¼ÒªÒÔÎÞbomµÄutf-8±àÂë¡£¾ßÌå·½·¨¿ÉÒÔÊÇ£ºÔÚDreamweaverÀï ......

PHPɾ³ýÊý×éÖеÄij¸öÔªËØ

PHPÊý×麯ÊýÖÐòËÆûÓÐÌṩɾ³ýÊý×éÖеÄij¸öÔªËصĺ¯Êý
µ«È´ÓÐÒ»¸öarray_search£¨²éÕÒÊý×éÖеÄij¸öÔªËØ£¬²¢·µ»ØÆä¼üÃû£©
ÄÇô¾ÍÓÃÒ»ÏÂËüÁË
$array_key = array_search($target_value,$target_array);
if($array_key||$array_key==0)unset($target_array[$target_value]);
//ÕâÀïµÄÌõ¼þÓÃ$array_key!==falseÒ²ÊÇ¿ÉÒԵİ ......

LAMP(Linux+Apache+MySQL+PHP)·þÎñÆ÷µÄÐÔÄÜÓÅ»¯

Ä¿Ç°LAMP (Linux + Apache + MySQL + PHPspan style="font-family: Verdana;">) ½ü¼¸ÄêÀ´·¢Õ¹Ñ¸ËÙ£¬ÒѾ­³ÉΪWeb ·þÎñÆ÷µÄÊÂʵ±ê×¼¡£LAMPÕâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Mag
 
azine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹ ......

PHPѧϰ֮ PHP ×Ö·û´®

×Ö·û´®±äÁ¿ÓÃÓÚ´æ´¢²¢´¦ÀíÎı¾Æ¬¶Î¡£
PHP ÖеÄ×Ö·û´®
×Ö·û´®±äÁ¿ÓÃÓÚ°üº¬×Ö·û´®µÄÖµ¡£
ÔÚ±¾½Ì³ÌÖУ¬ÎÒÃÇ´òËã½éÉܼ¸¸öÔÚ PHP ÖÐÓÃÓÚ²Ù×÷×Ö·û´®µÄ×î³£Óõĺ¯ÊýºÍÔËËã·û¡£
ÔÚ´´½¨×Ö·û´®Ö®ºó£¬ÎÒÃǾͿÉÒÔ¶ÔËü½øÐвÙ×÷ÁË¡£Äú¿ÉÒÔÖ±½ÓÔÚº¯ÊýÖÐʹÓÃ×Ö·û´®£¬»òÕß°ÑËü´æ´¢ÔÚ±äÁ¿ÖС£
ÔÚÏÂÃ棬PHP ½Å±¾°Ñ×Ö·û´® "Hello World" ¸³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ