PHP¿ª·¢³£¼ûÎÊÌâ½â¾öÁбí
PHP¿ª·¢³£¼ûÎÊÌâ½â¾öÁбí
1. ѧϰZend Framework tutorial¹ý³ÌÖеÄÎÊÌâ
£¨1£©Ö´ÐÐ"zf create project zf-tutorial"³öÏÖÈçÏ´íÎó£º
'"php.exe"' is not recognized as an internal or external command, operable program or batch file.
½â¾ö°ì·¨£ºÔÒòÊÇÒòΪphp.exeËùÔڵķ¾¶Ã»Óмӵ½ÏµÍ³»·¾³±äÁ¿PathÖС£¼ÓÈëºó¼´¿É½â¾ö¡£
£¨2£©·ÃÎÊhttp://localhost/zf-tutorial/publicʱ³öÏÖ403Forbidden´íÎó¡£Õâ¸öÎÊÌâ¸ãÁËÎҺܾã¬×îºó·¢ÏÖÊÇpublicϵÄ.htaccessÅäÖò»µ±Ôì³ÉµÄ£¬½«ÎļþÄÚÈÝÌ滻ΪÈçϾͿÉÒÔ½â¾öÁË¡£Ä¿Ç°Ô´ÎļþÅäÖýÏΪ¸´ÔÓ£¬Ã»¿´¶®£¬ÏȽâ¾öÎÊÌâÔÙ¼ÌÐøÑо¿¡£
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
Ïà¹ØÎĵµ£º
½øÐÐÎļþµÄ¶ÁºÍд£¬ÏÈ´ò¿ªÒ»¸öÎļþ£¬È»ºó¿ªÊ¼¶Á»òÕßдÎļþ£¬×îºóÔÙ¹ØϵÕâ¸öÎļþ×ÊÔ´¡£
È磬ÎļþµÄ¶Á²Ù×÷£º
<?php
$file = fopen('your file path','r');
while(!feof($file)){ //µ±Ã»ÓжÁÈ¡µ½Îļþ½á⣬¼ÌÐøÑ»·¶ÁÈ¡²Ù×÷
$line = fgets($file); //¶ÁÈ¡µ½Ò»ÐеÄÄÚÈÝ
echo $line.'<br/>';
}
fclose($file) ......
#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......
PHP±äÁ¿
1¡¢PHP±äÁ¿µÄ¶¨Òå
ÔÚPHPÖУ¬Ê¹ÓÃ×Ö·û´®µÄÃÀÔª·ûºÅ£¨$£©ºóÃæ¸úÉÏÒ»¸ö±êʾ·û£¬¼´±äÁ¿Ãû³Æ£¬ÀýÈ磺$name¡¢$age£¬±íʾһ¸ö±äÁ¿¡£
2¡¢±äÁ¿Ãû³ÆµÄÃüÃû¹æÔò
±äÁ¿Ãû³ÆÓÉ×Öĸ¡¢Ï»®Ïß¿ªÍ·£¬ºóÃæ¸úÉÏÈÎÒâÊýÁ¿µÄ×Öĸ¡¢Êý×Ö»òÕßÏ»®Ïß
±äÁ¿Ãû³Æ²»ÄÜÒÔÊý×Ö¿ªÍ·£¬Öм䲻ÄÜÓпոñ
±äÁ¿Ãû³Æ¿ÉÒÔʹÓÃÖÐÎÄ
±äÁ¿Ãû³Æ¶Ô´óСд ......
±¾½Ì³ÌÀ´×ÔPHP½Ì³ÌÍø(www.phpjc.cn)
PHP ÖеıäÁ¿
±äÁ¿ÓÃÓÚ´æ´¢Öµ£¬±ÈÈçÊý×Ö¡¢Îı¾×Ö·û´®»òÊý×é¡£
Ò»µ©ÉèÖÃÁËij¸ö±äÁ¿£¬ÎÒÃǾͿÉÒÔÔڽű¾ÖÐÖظ´µØʹÓÃËü¡£
PHP ÖеÄËùÓбäÁ¿¶¼ÊÇÒÔ $ ·ûºÅ¿ªÊ¼µÄ£¬±äÁ¿ÃûÊÇÇø·Ö´óСдµÄ¡£
ÔÚ PHP ÖÐÉèÖñäÁ¿µÄÕýÈ··½·¨ÊÇ£º
$var_name = value;
PHP µÄÈëÃÅÕßÍùÍù»áÍü¼ÇÔÚ±äÁ¿µÄÇ°Ãæµ ......