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

PHP»ù±¾Óï·¨£¨Áù£©—— Êý×é

Êý×é
ÔÚʹÓà PHP ½øÐпª·¢µÄ¹ý³ÌÖУ¬»òÔç»òÍí£¬Äú»áÐèÒª´´½¨Ðí¶àÏàËÆµÄ±äÁ¿¡£ÎÞÐèºÜ¶àÏàËÆµÄ±äÁ¿£¬Äã¿ÉÒÔ°ÑÊý¾Ý×÷ÎªÔªËØ´æ´¢ÔÚÊý×éÖС£Êý×éÖеÄÔªËØ¶¼ÓÐ×Ô¼ºµÄ ID£¬Òò´Ë¿ÉÒÔ·½±ãµØ·ÃÎÊËüÃÇ¡£
ÓÐÈýÖÖÊý×éÀàÐÍ£º
ÊýÖµÊý×é
´øÓÐÊý×Ö ID ¼üµÄÊý×é
¹ØÁªÊý×é
Êý×éÖеÄÿ¸ö ID ¼ü¹ØÁªÒ»¸öÖµ
¶àάÊý×é
°üº¬Ò»¸ö»ò¶à¸öÊý×éµÄÊý×é
Ò»¡¢ÊýÖµÊý×é
ÊýÖµÊý×é´æ´¢µÄÿ¸öÔªËØ¶¼´øÓÐÒ»¸öÊý×Ö ID ¼ü¡£¿ÉÒÔʹÓò»Í¬µÄ·½·¨À´´´½¨ÊýÖµÊý×飺
Àý×Ó 1£º
ÔÚÕâ¸öÀý×ÓÖУ¬»á×Ô¶¯·ÖÅä ID ¼ü£º
$names = array("Peter","Quagmire","Joe");
Àý×Ó 2
ÔÚÕâ¸öÀý×ÓÖУ¬ÎÒÃÇÈ˹¤·ÖÅäµÄ ID ¼ü£º
$names[0] = "Peter";
$names[1] = "Quagmire";
$names[2] = "Joe";
¿ÉÒÔÔڽű¾ÖÐʹÓÃÕâЩ ID ¼ü£º
<?php
 
$names[0] = "Peter";
$names[1] = "Quagmire";
$names[2] = "Joe";
 
echo $names[1] . " and " . $names[2] . " are ". $names[0] . "'s neighbors";
?>
 
ÒÔÉÏ´úÂëµÄÊä³ö£º
Quagmire and Joe are Peter's neighbors
¶þ¡¢¹ØÁªÊý×é
¹ØÁªÊý×飬ËüµÄÿ¸ö ID ¼ü¶¼¹ØÁªÒ»¸öÖµ¡£ÔÚ´æ´¢ÓйؾßÌåÃüÃûµÄÖµµÄÊý¾Ýʱ£¬Ê¹ÓÃÊýÖµÊý×é²»ÊÇ×îºÃµÄ×ö·¨¡£Í¨¹ý¹ØÁªÊý×飬ÎÒÃÇ¿ÉÒÔ°ÑÖµ×÷Ϊ¼ü£¬²¢ÏòËüÃǸ³Öµ¡£
Àý×Ó 1
ÔÚ±¾ÀýÖУ¬ÎÒÃÇʹÓÃÒ»¸öÊý×é°ÑÄêÁä·ÖÅ䏸²»Í¬µÄÈË£º
$ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34);
Àý×Ó 2
±¾ÀýÓëÀý×Ó 1 Ïàͬ£¬²»¹ýչʾÁËÁíÒ»ÖÖ´´½¨Êý×éµÄ·½·¨£º
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
¿ÉÒÔÔڽű¾ÖÐʹÓà ID ¼ü£º
<?php
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
echo "Peter is " . $ages['Peter'] . " years old.";
?>
ÒÔÉϽű¾µÄÊä³ö£º
Peter is 32 years old.
Èý¡¢¶àάÊý×é
ÔÚ¶àάÊý×éÖУ¬Ö÷Êý×éÖеÄÿ¸öÔªËØÒ²ÊÇÒ»¸öÊý×é¡£ÔÚ×ÓÊý×éÖеÄÿ¸öÔªËØÒ²¿ÉÒÔÊÇÊý×飬ÒÔ´ËÀàÍÆ¡£
Àý×Ó 1
ÔÚ±¾ÀýÖУ¬ÎÒÃÇ´´½¨ÁËÒ»¸ö´øÓÐ×Ô¶¯·ÖÅäµÄ ID ¼üµÄ¶àάÊý×飺
$families = array
(
  "Griffin"=>array
  (
  "Peter",
  "Lois",
  "Megan"
  ),
  "Quagmire"=>array
  (
  "Glenn"
  ),
  "Brown"=>array
  (
  "Cleveland",
  "Loretta",
  "Junior"
  )
);
Èç¹ûÊä³öÕâ¸öÊý×éµÄ»°£¬Ó¦¸ÃÀàËÆÕâÑ


Ïà¹ØÎĵµ£º

ÎÒµÄVIMÅäÖÃPHP°æ

ÒÔÏÂÊDZ¾È˵ÄÉèÖÃÎļþ£¬Ï£Íû¶Ô´ó¼ÒÓÐÓãº
£¨×¢£º°æ±¾ÎªVIM7ÒÔÉÏ£©
£¨ÔÙ×¢£ºCtrl+x,Ctrl+o×Ô¶¯²¹È«£»Ctrl+n±äÁ¿²¹È«£©
£¨¼ÌÐø×¢£ºÏȽ«Îļþ±£´æÎª.php²Å¿ÉʹÓÃ×Ô¶¯²¹È«£¬Èç¹ûÏë¸ü»»Óï·¨Ìáʾ£¬¿ÉÒÔÑ¡Ôñ“Óï·¨->Ôڲ˵¥ÖÐÏÔʾÎļþÀàÐÍ->ÏëÓõÄÓïÑÔ,¶àµÄÏÅÈË£©
ĬÈÏÖ§³ÖµÄÓïÑÔÌáʾÓÐ:
C,CSS,html,javascript,php, ......

phpÉÏÔØÎļþÖ»Äܱ£´æÒ»Ð¡²¿·Ö

<html>
<head>
  <title>Uploading...</title>
</head>
<body>
<h1>Uploading file...</h1>
<?php
    echo '<pre>';
    print_r($_FILES);
    echo '</pre>';
    if ($_F ......

Zend_Search_Lucene´´½¨PHPÕ¾ÄÚËÑË÷


Zend_Search_Lucene ÊÇÒ»¸öÍêÈ«ÓÉ PHP 5 ±àдµÄͨÓÃÎı¾ËÑË÷ÒýÇæ¡£ÓÉÓÚÆä½«Ë÷Òý±£´æÔÚÎļþϵͳÖжø²»ÐèÒªÊý¾Ý¿âÖ§³Ö£¬Òò´ËËü¼¸ºõ¿ÉÒÔΪÈκÎÓÉ PHP Çý¶¯µÄÍøÕ¾Ôö¼ÓËÑË÷ÄÜÁ¦¡£Zend_Search_Lucene Ö§³ÖÏÂÁÐÌØÐÔ£º
¾ßÓÐÅÅÃû¹¦ÄܵÄËÑË÷——×î·ûºÏÒªÇóµÄ½á¹û³öÏÖÔÚ×îÇ°Ãæ
Ðí¶àÇ¿´óµÄ²éѯÀàÐÍ£º¶ÌÓï²éѯ¡¢Í¨Åä·û²éѯ ......

PHP»ù±¾Óï·¨£¨Èý£©—— IFÌõ¼þÓï¾ä

If...Else Óï¾ä
if¡¢elseif ÒÔ¼° else Óï¾äÓÃÓÚÖ´ÐлùÓÚ²»Í¬Ìõ¼þµÄ²»Í¬¶¯×÷¡£µ±Äú±àд´úÂëʱ£¬Äú³£³£ÐèҪΪ²»Í¬µÄÅжÏÖ´Ðв»Í¬µÄ¶¯×÷¡£Äú¿ÉÒÔÔÚ´úÂëÖÐʹÓÃÌõ¼þÓï¾äÀ´Íê³É´ËÈÎÎñ£º
if...else Óï¾ä
    ÔÚÌõ¼þ³ÉÁ¢Ê±Ö´ÐÐÒ»¿é´úÂ룬Ìõ¼þ²»³ÉÁ¢Ê±Ö´ÐÐÁíÒ»¿é´úÂë
elseif Óï¾ä
    Óë if...el ......

PHP»ù±¾Óï·¨£¨ËÄ£©—— switchÓï¾ä

switch Óï¾ä
Èç¹ûÄúÏ£ÍûÓÐÑ¡ÔñµØÖ´ÐÐÈô¸É´úÂë¿éÖ®Ò»£¬ÇëʹÓà Switch Óï¾ä¡£Ê¹Óà Switch Óï¾ä¿ÉÒÔ±ÜÃâÈß³¤µÄ if..elseif..else ´úÂë¿é¡£
Óï·¨
switch (expression)
{
case label1:
  code to be executed if expression = label1;
  break; 
case label2:
  code to be executed if expressio ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ