PHP±äÁ¿
PHP±äÁ¿
1¡¢PHP±äÁ¿µÄ¶¨Òå
ÔÚPHPÖУ¬Ê¹ÓÃ×Ö·û´®µÄÃÀÔª·ûºÅ£¨$£©ºóÃæ¸úÉÏÒ»¸ö±êʾ·û£¬¼´±äÁ¿Ãû³Æ£¬ÀýÈ磺$name¡¢$age£¬±íʾһ¸ö±äÁ¿¡£
2¡¢±äÁ¿Ãû³ÆµÄÃüÃû¹æÔò
±äÁ¿Ãû³ÆÓÉ×Öĸ¡¢Ï»®Ïß¿ªÍ·£¬ºóÃæ¸úÉÏÈÎÒâÊýÁ¿µÄ×Öĸ¡¢Êý×Ö»òÕßÏ»®Ïß
±äÁ¿Ãû³Æ²»ÄÜÒÔÊý×Ö¿ªÍ·£¬Öм䲻ÄÜÓпոñ
±äÁ¿Ãû³Æ¿ÉÒÔʹÓÃÖÐÎÄ
±äÁ¿Ãû³Æ¶Ô´óСдÃô¸Ð
¡¾Ê¾Àý¡¿
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<?php
$var = 'Bob';
$Var = 'Joe';
echo "$var, $Var";
// Êä³ö Bob, Joe
$4site = 'not yet'; // ·Ç·¨±äÁ¿Ãû£¬ÒÔÊý×Ö¿ªÍ·
$_4site = 'not yet'; // ºÏ·¨±äÁ¿Ãû£¬ÒÔÏ»®Ïß¿ªÍ·
$iÕ¾µãis = 'mansikka'; // ºÏ·¨±äÁ¿Ãû£¬¿ÉÒÔÓÃÖÐÎÄ
?>
<?php
$var = 'Bob';
$Var = 'Joe';
echo "$var, $Var";
// Êä³ö Bob, Joe
$4site = 'not yet'; // ·Ç·¨±äÁ¿Ãû£¬ÒÔÊý×Ö¿ªÍ·
$_4site = 'not yet'; // ºÏ·¨±äÁ¿Ãû£¬ÒÔÏ»®Ïß¿ªÍ·
$iÕ¾µãis = 'mansikka'; // ºÏ·¨±äÁ¿Ãû£¬¿ÉÒÔÓÃÖÐÎÄ
?>
365PHPÃâ·ÑÊÓÆµ½Ì³ÌÏÂÔØ£º PHP½Ì³ÌÊÓÆµ,Ãâ·ÑÊÓÆµÏÂÔØ -PHP¼ò½éÓëPHP±äÁ¿ÓëÊý¾ÝÀàÐÍ
×÷ÕߣºÂíÃ÷@PHPÅàѵ PHPÐÞ¶©1.0 2009-09
365PHP£¬ÖйúPHPÔÚÏßÅàѵµÚÒ»Æ·ÅÆ
±¾ÎÄ365PHP°æÈ¨ËùÓУ¬Î´¾Åú×¼×ªÔØ±Ø¾¿¡£
Ïà¹ØÎĵµ£º
Blogϵͳ×÷Ϊ´ó¼Ò×î³£½Ó´¥µÄ»¥ÁªÍø¶«¶«£¬ÔÚÕ¾³¤ÈºÌåÖм¸ºõÈËÊÖÒ»²©£¬´ÓÖªÃûÃÅ»§µÄ²©¿ÍƵµÀ£¬µ½ÍøÂçÓªÏúר¼Ò²©¿Í£¬ÍøÃñ¶Ô²©¿ÍµÄ¹Ø×¢¶ÈÔÚ²»¶ÏÌá¸ß²¢É¡£Ä¿Ç°ÍøÉÏÃâ·ÑµÄblogϵͳ̫ÔÓ£¬ÔÚ´ËÕûÀíPHP°æµÄBlog½éÉÜÈçÏ£º
1¡¢wordpress:http://www.wordpress.org ¹¦ÄÜÒ²ºÜÈ«Ãæ£¬Ó¦¸ÃÊÇÖ§³ÖblogµÄÊ×Ñ¡¡£ËüÓÐ×îÇ¿µÄÄ£°æ¹¦ÄÜ£¬ÒѾ ......
¡¾Ê²Ã´ÊÇMVC£¿¡¿
MVCÊÇÒ»¸ö¿ÉÒÔÈÃÄã°Ñ“Èý¸ö²¿·Ö£¨¼´MVCµÄÈ«³Æ£¬Model¡¢ View¡¢Controller£©”гµ÷µØ×é³ÉÒ»¸ö¸´ÔÓÓ¦ÓóÌÐòµÄ¸ÅÄî¡£Ò»Á¾Æû³µ¾ÍÊÇÒ»¸öÔÚÏÖʵÉú»îÖзdz£ºÃµÄMVCÀý×Ó¡£ÎÒÃÇ¿´³µ¶¼¿´Á½¸öView£¨ÏÔ Ê¾£©²¿·Ö£ºÄÚ²¿ºÍÍⲿ¡£¶øÕâÁ½¸ö¶¼Àë²»¿ªÒ»¸öController£ ......
ÈçºÎ²»Ê¹ÓÃprepared statment£¬¶øÊÇÓùýÂ˵ķ½·¨±ÜÃâSQL×¢ÈëÄØ£¿
Ò»°ãÀ´Ëµmysql×Ô´øµÄ¹ýÂ˺¯ÊýÊDZȽϿɿ¿µÄ¡£mysql_real_escape_string()
µ«ÊÇÕâ¸öº¯ÊýÔÚijЩ×Ö·û¼¯ÖÐÓÐÎÊÌ⣬±ÈÈçGBK¡£Èç¹ûÄãÓÃUTF8ÄÇû¹ØÏµ¡£
ÔÚPHPÀïÉèÖÃÊý¾Ý¿âµÄ×Ö·û¼¯²»Ó¦¸ÃÓãºmysql_query("SET NAMES UTF8");
¶øÓ¦¸ÃÓãºmysql_set_charset()
ÕâÑù ......
Ò»¡¢µÇ½
1.½øÈëlinux
2.Óû§Ãû: root
3.¿ÚÁî:123456
4.mysql Óû§Ãû root ÃÜÂë 123456
¶þ¡¢Æô¶¯mysqlÓëapache·þÎñ
1.Æô¶¯mysqÊý¾Ý¿â:/usr/local/mysql/bin/./mysqld_safe --user=mysql &
2.Í£Ö¹mysqlÊý¾Ý¿â:/usr/local/mysql/bin/mysqladmin -u root -p shutdown
3.Æô¶¯apache: /usr/local/apache2/bin/./ap ......
class lamp
{
public function __construct()
{
}
public function __get($var) //»ñÈ¡²»´æÔÚµÄÊôÐÔʱµ÷ÓÃ
{
echo "²»´æÔÚ±äÁ¿$var<br>";
}
public function __set($var ......