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

PHPѧϰ ÔËËã·ûÓÅÏȼ¶ ºÍ ÔËËã·û

ÔËËã·ûÓÅÏȼ¶
ϱí´ÓµÍµ½¸ßÁгöÁËÔËËã·ûµÄÓÅÏȼ¶¡£
½áºÏ·½Ïò ÔËËã·û
×ó ,
×ó or
×ó xor
×ó and
ÓÒ print
ÓÒ = += -= *= /= .= %= &= |= ^= ~= <<= >>=
×ó ? :
×ó ||
×ó &&
½áºÏ·½Ïò ÔËËã·û
×ó |
×ó ^
×ó &
ÎÞ == != === !==
ÎÞ < <= > >=
×ó << >>
×ó + - .
×ó * / %
ÓÒ ! ~ ++ -- (int) (float) (string) (array) (object) @
ÓÒ [
ÎÞ new
ËãÊõÔËËã·û
ÔËËã·û Ãû³Æ ½á¹û
$a + $b ¼Ó·¨ $a ºÍ $b µÄºÍ
$a - $b ¼õ·¨ $a ºÍ $b µÄ²î
$a * $b ³Ë·¨ $a ºÍ $b µÄ»ý
$a / $b ³ý·¨ $a ³ýÒÔ $b µÄÉÌ
$a % $b È¡Ä£ $a ³ýÒÔ $b µÄÓàÊý
µÝÔö£¯µÝ¼õÔËËã·û
ÔËËã·û Ãû³Æ ½á¹û
++$a ¡¡Ç°¼Ó ¡¡¡¡$a µÄÖµ¼ÓÒ»£¬È»ºó½øÐвÙ×÷
$a++ ºó¼Ó ¡¡¡¡$a µÄÖµÏȽøÐвÙ×÷£¬ºó¼ÓÒ»
--$a¡¡¡¡ Ç°¼õ ¡¡¡¡$a µÄÖµ¼õÒ»£¬È»ºó½øÐвÙ×÷
$a--¡¡¡¡ ºó¼õ ¡¡¡¡$a µÄÖµÏȽøÐвÙ×÷£¬ºó¼õÒ»
ʵÀý£º
<?php
echo $a=5+”5th”; //Êä³ö£º10
echo 10%3; //Êä³ö£º1
echo 10+ $a++; //Êä³ö£º20
echo 5- --$a; //Êä³ö£º-5
?>
ËãÊõÔËËã·û
ÔËËã·û Ãû³Æ ½á¹û
$a + $b ¼Ó·¨ $a ºÍ $b µÄºÍ
$a - $b ¼õ·¨ $a ºÍ $b µÄ²î
$a * $b ³Ë·¨ $a ºÍ $b µÄ»ý
$a / $b ³ý·¨ $a ³ýÒÔ $b µÄÉÌ
$a % $b È¡Ä£ $a ³ýÒÔ $b µÄÓàÊý
µÝÔö£¯µÝ¼õÔËËã·û
ÔËËã·û Ãû³Æ ½á¹û
++$a ¡¡Ç°¼Ó ¡¡¡¡$a µÄÖµ¼ÓÒ»£¬È»ºó½øÐвÙ×÷
$a++ ºó¼Ó ¡¡¡¡$a µÄÖµÏȽøÐвÙ×÷£¬ºó¼ÓÒ»
--$a¡¡¡¡ Ç°¼õ ¡¡¡¡$a µÄÖµ¼õÒ»£¬È»ºó½øÐвÙ×÷
$a--¡¡¡¡ ºó¼õ ¡¡¡¡$a µÄÖµÏȽøÐвÙ×÷£¬ºó¼õÒ»
ʵÀý£º
<?php
echo $a=5+”5th”; //Êä³ö£º10
echo 10%3; //Êä³ö£º1
echo 10+ $a++; //Êä³ö£º20
echo 5- --$a; //Êä³ö£º-5
?>
±È½ÏÔËËã·û
ÔËËã·û Ãû³Æ ½á¹û
$a == $b µÈÓÚ TRUE£¬Èç¹û$aµÈÓÚ$b
$a === $b È«µÈ TRUE£¬Èç¹û$aµÈÓÚ$b£¬²¢ÇÒËüÃǵÄÀàÐÍÒ²Ïàͬ
$a != $b ²»µÈ TRUE£¬Èç¹û$a²»µÈÓÚ$b
$a <> $b ²»µÈ TRUE£¬Èç¹û$a²»µÈÓÚ$b
$a !== $b ·ÇÈ«µÈ TRUE£¬Èç¹û$a²»µÈÓÚ$b£¬»òÕßËüÃǵÄÀàÐͲ»Í¬
$a < $b СÓÚ TRUE£¬Èç¹û$aÑϸñСÓÚ$b
$a > $b ´óÓÚ TRUE£¬Èç¹û$aÑϸñ$b
$a <= $b СÓÚµÈÓÚ TRUE£¬Èç¹û $a СÓÚ»òµÈÓÚ$b
$a >= $b ´óÓÚµÈÓÚ TRUE£¬Èç¹û $a ´óÓÚ»òµÈÓÚ$b
ÁíÍâÒ»¸öÌõ¼þÔËËã·ûÊÇ“ ? : ”£¨»òÈýÔª£


Ïà¹ØÎĵµ£º

phpÏÂÔØÎļþÏà¹Ø×ÊÁÏ

µ±ÏÂÔØÎļþÐèÒªÓë·þÎñ¶Ë½»»¥Ê±£¬¾ÍÐèÒªÓýű¾À´ÊµÏÖ£¬¶ø²»Êǵ¥´¿µØÁ´½Óµ½ÎļþµÄµØÖ·
ÏÂÔØmp3ÎļþµÄÀý×Ó
<?php
$file_path = './data/upload/song/sample.mp3';
$file_name = 'sample.mp3';
$file_size = filesize($file_path);
header ( "Pragma: public" );
header ( "Cache-Control: must-reval ......

CentOS apache+mysql+php°²×°

CENTOS 5µÄÐéÄâ»ú£¬Ôõô´ÓͼÐνçÃæÇл»µ½ÃüÁîÐнçÃæ
1.ÁÙʱÇл»£º
ctrl+alt+1 …… ctrl+alt+6Ò»¹²Áù¸ö¿ØÖÆ̨¡£
2.ÓÀ¾Ã¹Ø±ÕͼÐλ¯£º
ÔÚrootÏÂÊäÈë vi /etc/inittab ½«init:5ÐÞ¸ÄΪinit:3 
Mysql rpm°ü°²×°£¬²»ÄÜÖض¨Î»(relocatable)
rpm°ü°²×°Òì³££¬--prefix ²ÎÊý²»ÄÜÖض¨Î»£¬°²×°µ½ÁíÒ»¸öĿ¼µÄÔ­ ......

·ÖÎöPHPµÄob_start()


ÔÚPHP±à³ÌÖÐ, ÎÒÃǾ­³£»áÓöµ½Ò»Ð©Ö±½Ó²úÉúÊä³öµÄº¯Êý, Èçpassthru(),readfile(), var_dump() µÈ. µ«ÓÐʱÎÒÃÇÏë°ÑÕâЩº¯ÊýµÄÊä³öµ¼Èëµ½ÎļþÖÐ,»òÕßÏȾ­¹ý´¦ÀíÔÙÊä³ö, »òÕß°ÑÕâЩº¯ÊýµÄÊä³ö×÷Ϊ×Ö·û´®À´´¦Àí.
¡¡¡¡ÕâʱÎÒÃǾÍÒªÓõ½ Output Buffer(Êä³ö»º³å) º¯ÊýÁË.
´¦ÀíÊä³ö»º³åµÄº¯ÊýÖ÷ÒªÓÐÕâô¼¸¸ö:
ob_start() ¿ªÊ¼Ê ......

PHPÖ®session

sessionµÄ×÷ÓÃÓòÊÇÔÚÒ»´Î»á»°ÖÐÆð×÷Óã¬ËùÒÔÔÚÒ»´Î»á»°ÖУ¬¿ÉÒÔÓÃSessionÀ´´æ´¢±£´æËùÐèÒªµÄÖµ£¬ÈçʵÏÖ¹ºÎï³µ£¬¿Í»§ÊÇ·ñµÇ¼µÄÑéÖ¤µÈµÈ¡£ÔÚʹÓÃÇ°Ê×ÏÈÒª¿ªÆôsession
<?php 
session_start(); 
?> 
¿¼ÂÇÊÇ·ñ¿ÉдÈësession
<?php 
if (isset($_POST['userid'])){ 
$_SESSION[' ......

3ÖÖ·½·¨ÐÞ¸ÄPHPʱÇø king of

PHP5.2.4֮ǰµÄ°æ±¾ÎÞÐèÉèÖÃʱÇø¡£ÏÂÃæÊÇÐÞ¸ÄPHPʱÇøµÄÈý¸ö°ì·¨¡£
1¡¢ÐÞ¸ÄPHP.iniÕâ¸öÎļþ
ÕÒµ½date.timezoneÕâÐУ¬È¥µôÇ°ÃæµÄ·ÖºÅ£¬¸Ä³É£º date.timezone = Asia/Shanghai 2¡¢ÐÞ¸Ä .htaccessÎļþ
ÐÞ¸Ä.htaccessÎļþÓÐÁ½ÖÖ°ì·¨£¬ÏÂÃæµÄÁ½ÌõÓï¾äÖ»ÒªÓÐÒ»Ìõ¼´¿É php_value date.timezone Asia/Shanghai
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ