WindowsÏÂPHP¿ª·¢»·¾³´î½¨ÇóÖú£¡ - PHP / »ù´¡±à³Ì
ÔÚÐÞ¸ÄÍêphp.ini£¬ºÍhpptd.confºó´ò¿ªhttp://localhostÄܹ»ÏÔʾIt Works!ͨ¹ýapacheÖ§³Öphp5²âÑé,²»¹ý²»ÖªµÀΪʲôºóÀ´´ò¿ªhttp://localhostºÍhttp://localhost/index.phpЧ¹û¶¼ÊÇPHPÐÅÏ¢¡£
´ò¿ªhttp://localhost/index.phpÄܹ»¿ªµ½PHPµÄÐÅÏ¢Á¬½Óͨ¹ýapacheºÍPHP5ÅäÖòâÑé
µ«ÊÇÔÚʹÓÃ
<?php
$dbhost = 'localhost';
$dbuser = 'root'; //ÄãµÄmysqlÓû§Ãû
$dbpass = '123456'; //ÄãµÄmysqlÃÜÂë
$dbname = 'mytest'; //ÄãµÄmysql¿âÃû
$connect = mysql_connect($dbhost,$dbuser,$dbpass);
if ($connect) {
echo "Á¬½Ó³É¹¦£©";
} else {
echo "Á¬½Óʧ°Ü";
}
?>
ÏÔʾ´íÎó£¬Fatal error: Call to undefined function mysql_connect() in D:\web\www\test.php on line 6¡£
ÎÒµÄMYSQLµÄ°²×°Ó¦¸ÃÊÇûÓÐÎÊÌâµÄ£¬ÎÒÒѾͨ¹ýmysql++ʹÓÃÁËÒ»¶Îʱ¼äÁË¡£
ÎÒMYSQLºÍPHPµÄ°æ±¾ÊÇ£º
PHP£ºphp-5.2.13-Win32.zip
MYSQL: mysql-essential-5.1.42-win32.zip
APACHE: apache_2.2.13-win32-x86-no_ssl.msi
°²×°µÄ·½·¨ÊÇÎÒÔÚÍøÉÏÕҵıȽϾµä£¨ÎÒ¿´Á˼¸¸ö¶¼²î²»¶à£©£¬µ«ÊǽñÌì¿´¡¶PHPÓëMySQL WEB¿ª·¢Ê¥¾ÖÐÎİ桷ʱ·¢ÏÖ˵°²×°PHP±ØÑ¡ÏÂÔØÁ½¸ö°²×°°ü
1. php-5.2.13-Win32.zip
2. pecl-5.2.13-Win32.zip
²»ÖªµÀÊDz»ÊÇÕâ¸öÎÊÌ⣬Çë´ó¼ÒÖ¸½Ì¹þ¡£
¿ª·¢°ü
easyphp
appservp
xampp
phpstudy
°¥..ÎÒÓÖ»ØÒäÎÒ´óѧ¹âÅäphpÅäÁËÒ»¸öÐÇÆÚµÄʱºòÁË.
php.ini ÎļþÅäÖÃûÓÐ
²é¿´Ò»ÏÂphpinfo£¬mysqlÅäÖúÃûÓС£
Õû¸ö×Ûº
Ïà¹ØÎÊ´ð£º
ĿǰÔÚÎ人ÕÒ¹¤×÷
·¢Ïִ󲿷ֹ«Ë¾ÎÞÍâºõÁ½ÖÖ
Ò»ÖÖÊǸãÍâ°üµÄ ÒªÓÃzend,cakephpµÈÍâ¹ú¿ò¼Ü
»¹ÒªÊìϤÍâ¹ú¿ªÔ´ÏµÍ³
Ò»ÖÖ¹úÄÚµÄ ÎÞÍâºõ dedecms ecshop shopexÕ⼸ÖÖ¸ÄÕ¾µã ÓеĹ«Ë¾ÉõÖÁÄÃһЩ¸üСµÄϵͳ¸ ......
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
PHP¸ÕÈëÃÅѧϰ,ÓÑÇé¶¥Ò»¸ö
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");< ......
phpÖÐÈçºÎÊä³öǧ·Öλ·Ö¸ô·û¡£¡£¡£¡£¡£
number_format
PHP code:
//ÊÇÕâÖÖЧ¹û°É£¿
echo number_format(123123123, 2, '.', ',');
//½á¹ûÊä³ö123,123,123.00 2ÊÇСÊýµãºóλÊý£¬µÚÈý¸ö²ÎÊýÊÇСÊýµã·Ö¸ô·û ......
ÎÒÒª×öÒ»¸ö»áÔ±×¢²áÆä±ØÐëÒªÊäÈëÊÖ»úºÅ»ñµÃÊÖ»úÑéÖ¤Â룬ÄãÃÇ˻ᰡ£¡
ÏȽøÐÐÊÖ»úÑéÖ¤»¹ÊÇÏÈ×¢²áÔÙÑéÖ¤£¿
ÐèҪʵÏÖÑéÖ¤Âë¶ÌÐÅ·¢Ë͵½ÊÖ»úÄÇÖÖ°É¡£ÐèÒª¶ÌÐŽӿڻòÕßÂò¸ö¶ÌÐÅè½øÐпª·¢
ÐèÒª½Ó¿ÚµÄ
²Î¿¼µØÖ·£ºht ......
ÇëÎʸ÷룬php±à³ÌÓÃʲô¿ª·¢¹¤¾ß±È½ÏºÃ°¡£¿°³ÕýÔÚѧ¡£
ÊÇÔÚwindowsϵġ£
×îºÃµÄÊÇzend studio
phpºÃѧÂð£¿
Ì«ºÃѧ£¬ÈçÓÐCµÄ»ù´¡¸üºÃ
PHPÈëÃÅ»¹ÊÇÂù¼òµ¥µÄ£¬PHP¿ª·¢¹¤¾ßEditplus£¬zend studio¶¼¿ÉÒÔ£¬ ......