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

PHPÔÓ¼Ç

 preg_replace -- Ö´ÐÐÕýÔò±í´ïʽµÄËÑË÷ºÍÌæ»»
array_push --  ½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
preg_match -- ½øÐÐÕýÔò±í´ïʽƥÅä
exif_imagetype($file) ---ͼÏñÀàÐÍ£»
echo "<SCRIPT LANGUAGE='JavaScript'>alert('µÃµ½');history.back();</SCRIPT>";
exit;
date_default_timezone_set('PRC');  ±±¾©Ê±¼ä£»
bool file_exists ( string filename)
Èç¹ûÓÉ filename Ö¸¶¨µÄÎļþ»òĿ¼´æÔÚÔò·µ»Ø TRUE£¬·ñÔò·µ»Ø FALSE¡£
<?php
$text = "\t\tThese are a few words :) ...  ";
echo trim($text);           // "These are a few words :) ..."
echo trim($text, " \t."); // "These are a few words :)"
// trim the ASCII control characters at the beginning and end of $binary
// (from 0 to 31 inclusive)
$clean = trim($binary, "\x00..\x1F");
?>
mysql À©Õ¹
<?php if(extension_loaded('mysql')?>
bool is_writable ( string filename)
is_writable -- Åжϸø¶¨µÄÎļþÃûÊÇ·ñ¿Éд
array_values() ·µ»Ø input Êý×éÖÐËùÓеÄÖµ²¢¸øÆä½¨Á¢Êý×ÖË÷Òý
$_GETÊý×éÖд«µÝµÄÊÇͨ¹ýurl´«µÝµÄÖµ£¬pageÊÇÊý×éµÄϱê
ÀýÈ磺
http://www.xx.cn/index.php?id=1&page=5
ÄÇô´«µÝ¹ýÀ´µÄ$_GETÊý×éÖÐ
$_GET['id']=1
$_GET['page']=5
globalÊÇÈ«¾Öº¯Êý
$_POST£¬$_GET,ÕâÁ½¸öº¯ÊýÊÇÌá½»±íµ¥Ê±ºòÓõ½
Ö»ÊÇ$_GETÌá½»µÄ¶«Î÷»áÏÔʾÔÚURLÖУ¬¶øÇÒ»áÓÐ×Ö½ÚÏÞÖÆ
$_POSTÌá½»µÄ¶«Î÷²»»áÏÔʾÔÚURLÖУ¬±È½Ï°²È«
section ¼ò½é
section:
sectionµÄ²úÉúÊÇΪ½â¾öforeachµÄ²»×ãµÄ£¬ÓëforeachÒ»Ñù£¬ËüÓÃÓÚÉè¼ÆÄ£°åÄÚµÄÑ­»·¿é£¬Ëü½ÏΪ¸´ÔÓ£¬¿É¼«´ó³ÌÐòÉÏÂú×ã³ÌÐòÐèÒª£¬ËùÒÔÔÚ³ÌÐòÖÐÎÒϰ¹ßʹÓÃËü¶ø²»Ê¹ÓÃforeach,»ù±¾Ô­ÐÎΪ£º
{section name = name loop = $varName[, start = $start, step = $step, max = $max, show = true]}
name: sectionµÄÃû³Æ£¬²»ÓüÓ$
$loop: Ҫѭ»·µÄ±äÁ¿£¬ÔÚ³ÌÐòÖÐҪʹÓÃassign¶ÔÕâ¸ö±äÁ¿½øÐвÙ×÷¡£
$start: ¿ªÊ¼Ñ­»·µÄϱ꣬ѭ»·Ï±êĬÈÏÓÉ0¿ªÊ¼
$step: ÿ´ÎÑ­»·Ê±Ï±êµÄÔöÊý
$max: ×î´óÑ­»·Ï±ê
$show: booleanÀàÐÍ£¬¾ö¶¨ÊÇ·ñ¶ÔÕâ¸ö¿é½øÐÐÏÔʾ£¬Ä¬ÈÏΪtrue
ÕâÀïÓиöÃû´ÊÐèҪ˵Ã÷£º
Ñ­»·Ï±꣺ʵ¼ÊËüµÄÓ¢ÎÄÃû³ÆÎªindex£¬ÊÇË÷Òýµ


Ïà¹ØÎĵµ£º

PHPÂëÅ©½ø»¯Ê·1_Zend

Zend-PHP±àÂë¹æ·¶
1.¶ÔÓÚÖ»°üº¬PHPµÄÎļþ£¬"?>"ÊDz»ÔÊÐí´æÔڵġ£×¢ÊÍ£º·Àֹĩβ±»ÒâÍâµÄ×¢Èë¿Õ°×²¢ÏÔʾÊä³ö¡£
2.Ëõ½øÓ¦Ê¹ÓÃËĸö¿Õ¸ñµÄËõ½ø£¬¶ø²»Ê¹ÓÃÖÆ±í·ûTAB¡£
3.Ò»ÐÐ80¸ö×Ö·ûÊDZȽϺÏÊʵģ¬×î¶àΪ120×Ö·û¡£
4.ÐеĽáÊø·ûÖ»ÄÜÊDZê×¼µÄUNIXÎı¾ÎļþµÄ»»ÐУ¬»»ÐзûÔÚÎļþÖбíʾΪ10£¬»ò16½øÖÆµÄ 0x0A¡£
²»ÒªÊ¹ÓÃwin ......

PHPÂëÅ©½ø»¯Ê·4


1.echo();2.print();3.die();4.printf();5.sprintf();6.print_r;7.var_dump();
1.echo()
Êä³ö¶à¸ö×Ö·û´®£¬¿ÉÒÔ¶à¸ö²ÎÊý£¬²»ÐèÒªÔ²À¨ºÅ£¬ÎÞ·µ»ØÖµ¡£
2.print()
Ö»ÄÜÊä³öÒ»Ñù¶«Î÷£¬ÐèÒªÔ²À¨ºÅ£¬Óзµ»ØÖµ£¬Ö´ÐÐʧ°ÜÊÇ·µ»Øflase.
3.die()
Êä³öÄÚÈÝ£¬Í£Ö¹³ÌÐò¡£*¶àÓÃÓÚÊý¾Ý¿âµÄÁ´½Óʱ£¬¼ìÑéÊÇ·ñ³ö´í¡£
4.printf()
prin ......

PHP С¼¼ÇÉ

=================================
mb_substr($str, 0, 1, "gbk");
Èç¹ûÌṩÁ˵ÚËĸö²ÎÊý£¬php»á½âÎöÕâ¸ö²ÎÊý
1. ½«Õâ¸ö²ÎÊýת»»³É×Ö·û´®.
2. µ÷ÓÃmbfl_name2no_encoding»ñµÃ±àÂëÆ÷ÐòºÅ
3. µÚ¶þ²½»áµ÷ÓÃmbfl_name2encoding£¬Õâ¸öº¯ÊýÔÚÑ­»·ÖÐʹÓÃÁËstrcasecmp
strcasecmpÊǺöÂÔ´óСдµÄ×Ö·û´®Æ¥Å䣬ÐÔÄܺܵͣ¬ ......

¼¸¸ö PHP Îļþ¶Áдº¯ÊýºÍ CSVFileObject Àà

/**
* ´ò¿ª¹Ø±ÕÎļþ
*/
fopen() // 2/4: 2 ¸ö±ØÑ¡²ÎÊý£¬ 4 ¸ö²ÎÊý;
fclose() // 1/1;
/**
* ¶ÁÈ¡Îļþ
*/
// ÐèÏÈÓà fopen() ´ò¿ªÎļþ²ÅÄܶÁÈ¡µÄº¯Êý£»´ÓÎļþÖ¸Õë´¦¿ªÊ¼¶ÁÈ¡
fgetc() // 1/1; ¶Áȡһ¸ö×Ö·û
fgets() // 1/2; ¶ÁȡһÐÐ
fgetss() // 1/3; ¶ÁȡһÐв¢È¥³ý HMTL ±êÇ©
fgetcsv() // 1/5; ¶ÁȡһÐв ......

PHP·¾¶ÎÊÌâ

<?
php define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
@set_include_path(get_include_path() . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . '/var' . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__);
ÄÜÏêϸµÄ½âÊÍÕâ¸öº¯ÊýÂ𣿵±È»Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ