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

PHPÀàʵÀý½Ì³Ì£¨Áù£©£º¹¹Ô캯Êý

¹¹Ôì·½·¨ÓÖ³ÆΪ¹¹Ô캯Êý£¬ÊǶÔÏó±»´´½¨Ê±×Ô¶¯µ÷Óõķ½·¨£¬ÓÃÀ´Íê³ÉÀà³õʼ»¯µÄ¹¤×÷¡£
¹¹Ô캯ÊýºÍÆäËüº¯ÊýÒ»Ñù£¬¿ÉÒÔ´«µÝ²ÎÊý£¬¿ÉÒÔÉ趨²ÎÊýĬÈÏÖµ¡£¹¹Ô캯Êý¿ÉÒÔµ÷ÓÃÊôÐÔ£¬¿ÉÒÔµ÷Ó÷½·¨¡£¹¹Ô캯Êý¿ÉÒÔ±»ÆäËü·½·¨ÏÔʽµ÷Óá£
ÔÚPHP4 ÖÐʹÓÃÓëÀàÃûͬÃûµÄ·½·¨Îª¹¹Ô캯Êý¡£ÔÚPHP5ÖÐÒÀȻ֧³ÖÁËÕâÖÖ·½Ê½£¬µ«²»½¨ÒéÔÙʹÓÃÕâÖÖ·½Ê½¡£
<?php
class Person {
private $name;
public function __construct($name) {
$this->name=$name;
echo "ÔÚÀà±»³õʼ»¯µÄʱºò£¬ÕâÀïµÄ´úÂ뽫»áÔËÐÐ<br />";
echo "\$name is $this->name <br />";
}
}
new Person("tom");
new Person("jack");
?>


Ïà¹ØÎĵµ£º

CentOS5 Ï°²×°Apache2+PHP5+MySQL

°²×°apache
# tar -zvxf httpd-2.2.14.tar.gz
# cd httpd-2.2.14
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
# make
# make install
°²×°MySQL
#yum -y install mysql-server
#yum -y install mysql-devel
°²×° jpeg7
½¨Á¢Ä¿Â¼£º
# mkdir -p /usr/local/jpeg7
# mkdir -p /usr/l ......

PHPÍæתMySQLÖ®Íâ¼üÔ¼Êø ÄÏÈý·½

ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«Ñ§Ï°ÈçºÎͨ¹ýPHP 5µÄÒ»¸ö»ù±¾³éÏóÀàʹÓÃÍâ¼üÔ¼ÊøÀ´¸üÐÂÁ½¸öInnoDB±íµÄÊý¾Ý¡£ ÎÒÃǽ«Í¨¹ý¾ßÌåʾÀýÀ´ËµÃ÷ÈçºÎͨ¹ý·þÎñÆ÷¶Ë½Å±¾ÓïÑÔÀ´Ê¹ÓÃÍâ¼üÔ¼Êø¡£
¡¡¡¡Ò»¡¢ÀûÓÃÍâ¼üÔ¼Êø¸üÐÂMySQLÖеÄÊý¾Ý
¡¡¡¡ÏÖÔÚ£¬×îÁ÷ÐеĿªÔ´¹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ·ÇMySQLĪÊô£¬¶øMySQLÓÖÖ§³Ö¶à¸ö´æ´¢ÒýÇ棬ÆäÖÐĬÈϵÄÒ²ÊÇËٶȽϿìµÄ´ ......

ÊÕ²ØPHP³£Óú¯ÊýÊÕ¼¯

<?
function GetIP() { //»ñÈ¡IP
if ($_SERVER["HTTP_X_FORWARDED_FOR"])
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
else if ($_SERVER["HTTP_CLIENT_IP"])
$ip = $_SERVER["HTTP_CLIENT_IP"];
else if ($_SERVER["REMOTE_ADDR"])
$ip = $_SERVER["REMOTE_ADDR"];
......

phpѧϰ

±àÕß°´£ºÑ§Ï°phpÊÇÒ»ÖÖ¿ÝÔïÎÞ棬ÕûÌìºÍ´úÂë´ò½»µÀµÄ¹ý³Ì£¬²»¹ýÏàÐÅÕâƪÎÄÕ»á¸øÄãÒ»µãÆôʾ°ïÖú¡£
ÈçºÎѧϰPHP/ѧϰphpµÄ·½·¨,ѧ¶«Î÷£¬ÓÀÔ¶²»ÒªÍýÏëÓÐËÙ³ÉÕâһ˵£¬¸æËßÄãÁËÒ»¸ö·½Ê½£¬µ«ÊÇȱÉÙŬÁ¦ÕâÒ»»·½Ú£¬ÄÇÒ²ÊÇ°×´î¡£ ÕÆÎպõÄѧϰ·½·¨·Ç³£±ØÒª,¿´¿´ÕâƪÈçºÎѧϰPHP/ѧϰphpµÄ·½·¨[תÔØ]
ÏàÐÅ´ó¼ÒÑ¡ÔñÒ»ÖÖÓïÑÔ£¬²¢²»ÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ