Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 sessionÅäÖÃ

Session]
; ³ý·ÇʹÓÃsession_register()»ò$_SESSION×¢²áÁËÒ»¸ö±äÁ¿¡£
; ·ñÔò²»¹ÜÊÇ·ñʹÓÃÁËsession_start()£¬¶¼²»»á×Ô¶¯Ìí¼ÓÈκÎsession¼Ç¼¡£
; °üÀ¨resource±äÁ¿»òÓÐÑ­»·ÒýÓõĶÔÏó°üº¬Ö¸Ïò×ÔÉíµÄÒýÓõĶÔÏ󣬲»Äܱ£´æÔڻỰÖС£
; register_globalsÖ¸Áî»áÓ°Ïìµ½»á»°±äÁ¿µÄ´æ´¢ºÍ»Ö¸´¡£
session ......

PHP+APACHE+MYSQL


copy F:\php\php5ts.dll F:\Apache2.2\bin\
copy F:\php\libmysql.dll F:\Apache2.2\bin\
copy F:\php\php.ini-recommended F:\php\php.ini
httpd:
LoadModule php5_module "F:\php\php5apache2_2.dll"
PHPIniDir "F:\php\php.ini"
AddType application/x-httpd-php .php
php.ini:
short_open_tag = Off ¸Ä³É sho ......

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
......

PHP¶à½ø³ÌЭ×÷±à³ÌÖ® popen

ʹÓÃpopen½áºÏSHELLÃüÁîÒ²¿ÉÒÔʵÏÖ¶à½ø³Ì²¢·¢±à³Ì¡£
ʵÀýÈçÏ£º
<?php
//b.phpÎļþ
$file = 'testdir/file.txt';
for ($i=0;$i<10;$i++){
    $fp = fopen($file,'a+');
    fputs($fp, $i.'\r\n');
    fclose($fp);
    sleep(1);
}
?> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ