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

PHPÊý×éµÄʹÓúͱéÀú

 1¡¢Êý×éµÄÉêÇëºÍʹÓãº
$array=array(array(2,324,34)); 
echo   $array[0][1]; 
Ö±½ÓÉêÇëʹÓãº
$student[0][0]="ÎÒ";
$student[0][1]="ÊÇ";
$student[1][0]="Ë­";
$student[1][1]="ά";
 echo   $student[1][0];
2¡¢±éÀú£º
foreach()ÊÇÒ»¸öÓÃÀ´±éÀúÊý×éÖÐÊý¾ÝµÄ×î¼òµ¥ÓÐЧµÄ·½·¨¡£
 
<?php
$colors = array('red','blue','green','yellow');
foreach ($colors as $color) {
echo "Do you like $color? <br />";
}
?>
 
ÏÔʾ½á¹û£º
Do you like red?
Do you like blue?
Do you like green?
Do you like yellow?
 
 
 
2. while()
while() ͨ³£ºÍ list()£¬each()ÅäºÏʹÓá£
#example2:
 
<?php
$colors = array('red','blue','green','yellow');

while(list($key,$val) = each($colors)) {
echo "Other list of $val.<br />";
}
?>
ÏÔʾ½á¹û£º
Other list of red.
Other list of blue.
Other list of green.
Other list of yellow.
 
 
 
3. for()
#example3:
 
<?php
$arr = array ("0" => "zero","1" => "one","2" => "two");

for ($i = 0;$i < count($arr); $i++) {
$str = $arr[$i];
echo "the number is $str.<br />";
}
?>
ÏÔʾ½á¹û£º
the number is zero.
the number is one.
the number is two.
 
 
 
========= ÒÔÏÂÊǺ¯Êý½éÉÜ ==========
key()
mixed key(array input_array)
key()º¯Êý·µ»Øinput_arrayÖÐλÓÚµ±Ç°Ö¸ÕëλÖõļüÔªËØ¡£
#example4
ÏÂÔØ: list_array04.php
 
<?php
$capitals = array("Ohio" => "Columbus","Towa" => "Des Moines","Arizona" => "Phoenix");
echo "<p>Can you name the capitals of these states?</p>";
while($key = key($capitals)) {
echo $key."<br />";
next($capitals);
//ÿ¸ökey()µ÷Óò»»áÍÆ½øÖ¸Õ롣Ϊ´ËҪʹÓÃnext()º¯Êý
}
?>
ÏÔʾ½á¹û£º
Can you name the capitals of these


Ïà¹ØÎĵµ£º

PHPʵÏÖÔ²½ÇͼƬ

¹¤×÷ÖÐÓõ½£¬×Ô¼ºÐ´ÁËÒ»¸ö£¬·ÖÏí¸øÓÐÐèÒªµÄÈË£¬Ç°ÃæÊÇÀඨÒ壬ºóÃæ2ÐÐÊǵ÷Óá£
Óŵ㣺
²»ÐèÒªÍⲿͼƬ
Ö§³ÖPNG͸Ã÷
¿É×Ô¶¨ÒåÔ²½Ç°ë¾¶
²»×㣺
Ö»ÄÜÖ¸¶¨Ò»ÖÖ͸Ã÷É«
 <?php
class RoundedCorner {
private $_r;
private $_g;
private $_b;
private $_image_path;
private $_radius;

function _ ......

PHP: global static ºÍ$GLOBALS$ʹÓÃÓëÇø±ð

1.globalÔÚÕû¸öÒ³ÃæÆð×÷Óá£
2.staticÖ»ÔÚfunctionºÍclassÄÚÆð×÷Óá£
globalºÍ$GLOBALSʹÓûù±¾Ïàͬ£¬µ«ÔÚʵ¼Ê¿ª·¢Öдó²»Ïàͬ¡£
globalÔÚº¯Êý²úÉúÒ»¸öÖ¸Ïòº¯ÊýÍⲿ±äÁ¿µÄ±ðÃû±äÁ¿£¬¶ø²»ÊÇÕæÕýµÄº¯ÊýÍⲿ±äÁ¿£¬Ò»µ«¸Ä±äÁ˱ðÃû±äÁ¿µÄÖ¸ÏòµØÖ·£¬¾Í»á·¢ÉúһЩÒâÁϲ»µ½Çé¿ö£¬ÀýÈçÀý×Ó1.
$GLOBALS[]ȷȷʵʵµ÷ÓÃÊÇÍⲿµÄ±äÁ¿£ ......

ÔÚ PHP ÖÐÑø³É 7 ¸öÃæÏò¶ÔÏóµÄºÃϰ¹ß

 ÔÚ PHP ±à³ÌÔçÆÚ£¬PHP ´úÂëÔÚ±¾ÖÊÉÏÊÇÏÞÓÚÃæÏò¹ý³ÌµÄ¡£¹ý³Ì´úÂë µÄÌØÕ÷ÔÚÓÚʹÓùý³Ì¹¹½¨Ó¦ÓóÌÐò¿é¡£¹ý³Ìͨ¹ýÔÊÐí¹ý³ÌÖ®¼äµÄµ÷ÓÃÌṩijÖ̶ֳȵÄÖØÓá£
µ«ÊÇ£¬Ã»ÓÐÃæÏò¶ÔÏóµÄÓïÑÔ¹¹Ô죬³ÌÐòÔ±ÈÔÈ»¿ÉÒÔ°Ñ OO ÌØÐÔÒýÈëµ½ PHP ´úÂëÖС£ÕâÑù×öÓеãÀ§ÄѲ¢ÇÒ»áʹ´úÂëÄÑÓÚÔĶÁ£¬ÒòΪËüÊÇ»ìºÏ·¶Àý£¨º¬ÓÐα OO Éè¼ÆµÄ¹ý³ÌÓïÑÔ£ ......

Á½²½¸ã¶¨windowsÏÂApache+tomcat+phpÕûºÏ

±¾½Ì³Ì²ÉÓõÄÊÇxampp×Ô´øµÄtomcat²å¼þÀ´Íê³ÉÕûºÏµÄ£¬ËùÒÔ£¬ÒªÏëÍê³ÉÕûºÏ£¬µÚÒ»²½²»ÐèÏÂÔØxampp£¬¼°Æätomcat²å¼þ~
1.´ò¿ªxampp¹ÙÍø µã´Ëxampp¹ÙÍø´ò¿ª
                          &n ......

PHP Security for Deployers

PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ