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

¡¾PHPϵÁн̡̳¿(6)——PHPÖеıí´ïʽ

±í´ïʽÊÇ PHP ×îÖØÒªµÄ»ùʯ¡£ÔÚ PHP ÖУ¬¼¸ºõÄãËùдµÄÈκζ«Î÷¶¼ÊÇÒ»¸ö±í´ïʽ¡£¼òµ¥µ«È´×ȷµÄ¶¨ÒåÒ»¸ö±í´ïʽµÄ·½Ê½¾ÍÊÇ“anything that has a value”¡£
×î»ù±¾µÄ±í´ïʽÐÎʽÊdz£Á¿ºÍ±äÁ¿¡£µ±Äã¼üÈë“$a = 5”£¬¼´½«Öµ '5' ·ÖÅä¸ø±äÁ¿ $a¡£'5'£¬ºÜÃ÷ÏÔ£¬ÖµÎª 5£¬»»¾ä»°Ëµ '5' ÊÇÒ»¸öֵΪ5µÄ±í´ïʽ£¨¼ÈÈ»Èç´Ë£¬'5' ÊÇÒ»¸öÕûÐͳ£Á¿£©¡£
¸³ÖµÖ®ºó£¬ÄãËùÅÎÍûµÄÇé¿öÊÇ $a µÄֵΪ5£¬Òò¶øÈç¹ûÄãдÏ $b = $a£¬ÆÚÍûµÄÊÇËüÓÌÈç $b = 5 Ò»Ñù¡£»»¾ä»°Ëµ£¬$a ÊÇÒ»¸öֵҲΪ 5 µÄ±í´ïʽ¡£Èç¹ûÒ»ÇÐÔËÐÐÕýÈ·£¬ÄÇÕâÕýÊǽ«Òª·¢ÉúµÄÕýÈ·½á¹û¡£
ÉÔ΢¸´Ôӵıí´ïʽÀý×Ó¾ÍÊǺ¯Êý¡£ÀýÈ磬¿¼ÂÇÏÂÃæµÄº¯Êý£º
<?php
function foo ()
{
return 5;
}
?>
¼Ù¶¨ÄãÒѾ­ÊìϤÁ˺¯ÊýµÄ¸ÅÄÈç¹û²»ÊǵĻ°£¬Ç뿴һϺ¯ÊýµÄÏà¹ØÕ½ڣ©£¬ÄÇô¼üÈë $c = foo() ´Ó±¾ÖÊÉÏÀ´Ëµ¾ÍÈçдÏ $c = 5£¬¶øÇÒÄãÊÇÕýÈ·µÄ¡£ º¯ÊýÒ²ÊDZí´ïʽ£¬±í´ïʽµÄÖµ¼´ÎªËüÃǵķµ»ØÖµ¡£¼ÈÈ» foo() ·µ»Ø5£¬±í´ïʽ ‘foo()’ µÄÖµÒ²ÊÇ5¡£Í¨³£º¯Êý²»»á½ö½ö·µ»ØÒ»¸ö¾²Ì¬Öµ£¬¶ø¿ÉÄÜ»á¼ÆËãһЩ¶«Î÷¡£
µ±È»£¬PHP ÖеÄÖµ³£³£²¢·ÇÊÇÕûÐ͵ġ£PHP Ö§³ÖÈýÖÖ±êÁ¿ÖµÀàÐÍ£ºÕûÐÍÖµ£¬¸¡µãÖµºÍ×Ö·û´®Öµ£¨±êÁ¿Öµ²»Äܲð·ÖΪ¸üСµÄµ¥Ôª£¬±ÈÈ磺Êý×飩¡£PHP Ò²Ö§³ÖÁ½ÖÖ¸´ºÏÀàÐÍ£ºÊý×éºÍ¶ÔÏó¡£ÕâÁ½ÖÖÀàÐ;߿ÉÒÔ¸³Öµ¸ø±äÁ¿»òÕß´Óº¯Êý·µ»Ø¡£
µ½Ä¿Ç°ÎªÖ¹£¬PHP/FI 2 µÄÓû§²»Ó¦¸Ã¸Ðµ½Èκεı仯¡£È»¶ø£¬µ±Ðí¶àÆäËüÓïÑÔΪ֮ŬÁ¦µÄʱºò£¬PHP ÔÚÏàͬµÀ·ÉÏ´Ù½øÁ˱í´ïʽµÄ³É³¤¡£PHP ÊÇÒ»ÖÖÃæÏò±í´ïʽµÄÓïÑÔ£¬´ÓÕâÒ»·½ÃæÀ´½²¼¸ºõÒ»Çж¼ÊDZí´ïʽ¡£¿¼ÂǸղÅÎÒÃÇÒѾ­Ñо¿¹ýµÄÀý×Ó£¬“$a = 5”¡£¿ÉÒÔÇáËɵĿ´µ½ÕâÀïÓÐÁ½¸öÏà¹ØµÄÖµ£¬ÕûÐͳ£Á¿ 5£¬¶øÇÒ±äÁ¿ $a µÄÖµÒ²±»¸üÐÂΪ 5¡£µ«ÊÇÊÂʵÊÇ£ºÕâÀïÖ»ÓÐÒ»¸öÏà¹ØµÄ¸½¼ÓÖµ£¬¼´±»·ÖÅäµÄÖµ±¾Éí¡£¸³Öµ²Ù×÷¼ÆËãÐè·ÖÅäµÄÖµ£¬¼´ 5¡£Êµ¼ÊÉÏ£¬Òâζ×Å“$a = 5”£¬²»±Ø¹ÜËüÊÇ×öʲôµÄ£¬ÊÇÒ»¸öֵΪ 5 µÄ±í´ïʽ¡£Òò¶ø£¬Ò»Ð©ÏñÕâÑùµÄ´úÂë“$b = ($a = 5)”ºÍ“$a =5; $b=5”£¨·ÖºÅ±êÖ¾×ÅÓï¾äµÄ½áÊø£©¡£ÒòΪ¸³Öµ²Ù×÷µÄ˳ÐòÊÇÓÉÓÒµ½×óµÄ£¬ÄãÒ²¿ÉÒÔÕâôд“$b = $a =5”¡£
ÁíÍâÒ»¸öºÜºÃµÄÃæÏò±í´ïʽµÄÀý×Ó¾ÍÊÇÇ°¡¢ºóµÝÔöºÍµÝ¼õ¡£PHP/FI 2 ºÍ¶àÊýÆäËüÓïÑÔµÄÓû§Ó¦¸Ã±È½ÏÊìϤ±äÁ¿ ++ ºÍ±äÁ¿ -- ·ûºÅ¡£¼´µÝÔöºÍµÝ¼õ²Ù×÷·û¡£ÔÚ PHP/FI 2 ÖУ¬Óï¾ä“$a++”ûÓÐÖµ£¨²»ÊDZí´ïʽ£©£¬ÕâÑùµÄ»°Äã±ã²»ÄÜΪÆ丳ֵ»òÕ


Ïà¹ØÎĵµ£º

php $_SERVERº¯ÊýÖÐQUERY_STRINGºÍREQUEST_URI

$_SERVER´æ´¢µ±Ç°·þÎñÆ÷ÐÅÏ¢£¬ÆäÖÐÓм¸¸öÖµÈç$_SERVER["QUERY_STRING"]£¬$_SERVER["REQUEST_URI"]£¬$_SERVER["SCRIPT_NAME"]ºÍ$_SERVER["PHP_SELF"]³£³£ÈÝÒ×»ìÏý£¬ÒÔÏÂͨ¹ýʵÀýÏê½â$_SERVERº¯ÊýÖÐQUERY_STRING£¬REQUEST_URI£¬SCRIPT_NAMEºÍPHP_SELF±äÁ¿Çø±ð£¬ÕÆÎÕÕâËÄÕßÖ®¼äµÄ¹Øϵ£¬±ãÓÚÔÚʵ¼ÊÓ¦ÓÃÖÐÕýÈ·»ñÈ¡ËùÐèÒªµÄÖµ
1£ ......

PHP mail Function With Attachments

Ô­ÌûµØÖ·£ºhttp://www.zedwood.com/article/126/php-mail-function-with-attachments
This code sends an html formatted email with attachments. This email sending script actually sends both a plaintext and an html body of the email, allowing the email client to choose which to display. The plaintext emai ......

40Ìõ¼¼ÇÉÓÅ»¯php´úÂ루PHP100£©

1.Èç¹ûÒ»¸ö·½·¨Äܱ»¾²Ì¬£¬ÄǾÍÉùÃ÷ËûΪ¾²Ì¬µÄ£¬ËٶȿÉÌá¸ß1/4;
2.echoµÄЧÂʸßÓÚprint,ÒòΪechoûÓзµ»ØÖµ£¬print·µ»ØÒ»¸öÕûÐÍ;
3.ÔÚÑ­»·Ö®Ç°ÉèÖÃÑ­»·µÄ×î´ó´ÎÊý£¬¶ø·ÇÔÚÔÚÑ­»·ÖÐ;
4.Ïú»Ù±äÁ¿È¥ÊÍ·ÅÄڴ棬ÌرðÊÇ´óµÄÊý×é;
5.±ÜÃâʹÓÃÏñ__get, __set, __autoloadµÈħÊõ·½·¨;
6.requiere_once()±È½ÏºÄ×ÊÔ´;
7.ÔÚi ......

ÔÚphpÖн«ÉÏ´«·â×°³ÉÀà

ÔÚʹÓÃÉÏ´«Îļþʱ£¬½«ÉÏ´«µÄ´úÂë·â×°³ÉÀ࣬¸üÈÝÒ×·½±ã¡£
 
190.php
<?php
require('upload.php');
if($_POST['submit']){
$a = new Upload();
$File = $a -> uploadfile($ARG=array(
'File'=>array(
'name' => $_FILES['fileDoc']['name'],         //Ô ......

PHP×ÔѧÈÕ¼Ç


--------------01-05--------------------
*
*              Îļþ²Ù×÷
*
---------------------------------------
¶ÁÈ¡Õû¸öÎļþ: readfile(), fpassthru(), file()
¶ÁÈ¡Ò»¸ö×Ö·û: fgetc()
¶ÁÈ¡ÈÎÒⳤ¶È: fread()
²é¿´ÎļþÊÇ·ñ´æÔÚ: file_exis ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ