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

phpµ¥ÒýºÅºÍË«ÒýºÅµÄÇø±ð

±¾ÎÄת×Ôhttp://xfs39.javaeye.com/blog/411508 ¸Ðл×÷Õß·ÖÏí
phpµ¥ÒýºÅºÍË«ÒýºÅµÄÇø±ð



    ½ñÌ죬ÓÐÒ»ÐÂѧPHPµÄÍøÓÑÎÊÁ˲èũһ¸öÎÊÌ⣺“µ¥ÒýºÅºÍË«ÒýºÅµÄÇø±ðºÍÓ÷¨£¿”£¬ÏÖ½«´ð°¸×ܽáÁËÏ£¬Ð´³ÉÕâÆªÐ¡¶ÌÎÄ¡£
" "Ë«ÒýºÅÀïÃæµÄ×ֶλᾭ¹ý±àÒëÆ÷½âÊÍ£¬È»ºóÔÙµ±×÷HTML´úÂëÊä³ö¡£
' 'µ¥ÒýºÅÀïÃæµÄ²»½øÐнâÊÍ£¬Ö±½ÓÊä³ö¡£
ÀýÈ磺
$abc='my name is tome';
echo $abc //½á¹ûÊÇ:my name is tom
echo '$abc' //½á¹ûÊÇ:$abc
echo "$abc" //½á¹ûÊÇ:my name is tom
ÌØ±ðÔÚʹÓÃMYSQLÓï¾äµÄʱºò£¬Ë«ÒýºÅºÍµ¥ÒýºÅµÄÓ÷¨ÈÃÐÂÊÖ²»ÖªËù´ë£¬ÔÚÕâÀ¾Ù¸öÀý×Ó£¬À´½øÐÐ˵Ã÷¡£
¼ÙÉè²éѯÌõ¼þÖÐʹÓõÄÊdz£Á¿£¬ÀýÈ磺
select    *    from    abc_table where user_name='abc';
SQLÓï¾ä¿ÉÒÔд³É:
SQLstr = "select    *    from abc_table where user _name= 'abc'" ;
¼ÙÉè²éѯÌõ¼þÖÐʹÓõÄÊDZäÁ¿£¬ÀýÈ磺
$user_name = $_REQUEST['user_name']; //×Ö·û´®±äÁ¿
»ò
$user=array ("name"=>
$_REQUEST['user_name‘,"age"=>$_REQUEST['age'];//Êý×é±äÁ¿
SQLÓï¾ä¾Í¿ÉÒÔд³É£º
SQLstr = "select    *    from abc_table where user_name = ' " .
$user_name . " ' ";
SQLstr = "select * from abc_table where user_name = ' " .
$user["name"] . " ' ";
¶Ô±ÈÒ»ÏÂ:
SQLstr="select * from abc_table where user_name = ' abc ' " ;
SQLstr="select * from abc_table where user_name =' " . $user _name .
" ' ";
SQLstr="select * from abc_table where user_name =' " . $user["name"]
. " ' ";
SQLstr¿ÉÒÔ·Ö½âΪÒÔÏÂ3¸ö²¿·Ö:
1£º"select * from table where user_name = ' " //¹Ì¶¨SQLÓï¾ä
2£º$user //±äÁ¿
3£º" ' "
1,2,3²¿·Ö×Ö·û´®Ö®¼äÓÃ"." À´Á¬½Ó


Ïà¹ØÎĵµ£º

PHP»ñÈ¡radioÖµ£¬²¢ÓÃ×÷²ÎÊý²éѯÊý¾Ý¿â£¬Í¬Ò»Ò³ÃæÏÔʾ

/***************************by garcon1986************************************/
<?php
error_reporting(E_ALL ^ E_NOTICE);
//create database test
//create table php_radio(id int(10) NOT NULL AUTO_INCREMENT, name varchar(100), description varchar(1000), primary key(id));
//insert php_radio value ......

PHPÖеÄÅú´¦Àí£¨Ò»£©

ת×Ô£º http://www.phpsoho.com/article/php/200809/09-239.html
Èç¹û Web Ó¦ÓóÌÐòÖеÄÒ»¸öÌØÐÔÐèÒª³¬¹ý 1 Ãë»ò 2 Ãë²ÅÄÜÍê³É£¬ÄÇôӦ¸ÃÔõô°ì£¿ÐèҪijÖÖÀëÏß´¦Àí½â¾ö·½°¸¡£Ñ§Ï°¼¸ÖÖ¶Ô PHP Ó¦ÓóÌÐòÖг¤Ê±¼äÔËÐеÄ×÷Òµ½øÐÐÀëÏß·þÎñµÄ·½·¨¡£
´óÐ͵ÄÁ¬ËøµêÓÐÒ»¸ö´óÎÊÌ⡣ÿÌ죬ÔÚÿ¼ÒÉ̵ê»á·¢ÉúÊýǧ´Î½»Òס ......

PHP³õѧ

   ÏÖÔÚ¶ÔPHP¸Ð¾õÔ½À´Ô½Ë³ÊÖÁË£¬¶ÔHTMLµÄ±êǩԽÀ´Ô½ÊìϤÁË£¬¿ÉÊǶÔPHPµÄ²å¼þµÄÈÏʶ»¹ÎªÖ®ÉõÉÙ¡£
   µ«ÊÇ£¬ËµÊµ»°£¬Ä¿Ç°µÄÎÒÃ²ËÆÒ²²»ÐèҪʹÓÃPHPµÄ²å¼þ£¬Óòå¼þµÄÄ¿µÄ¿ÉÄÜÊÇΪÁËÏԵñȽÏÅ£°É£¬ºÇºÇ¡£
   µ«ÊÇ»¹ÊÇ̤̤ʵʵµÄѧϰ°É£¬±Ï¾¹¶îµÄC++»¹Ã»ÓÐѧ£¬¶ÔÓÚPHPµÄ·â×°ºÍ±à³ÌÒ»µãÒ²²»Á˽⡣ ......

ÎÒ»ØÀ´ÁË£¬ÖØÐÂͶÈëPHPµÄ»³±§

¹ýÄêÁË£¬Ò²ÕÇÁËÒ»ËêÁË£¬¸Ð¾õûÓг¤½ø°¡£¡
°¦£¡
Äêǰ²Î¼ÓÁËÖйúµçÐŵÄÃæÊÔ¡£
¸Ð¾õºÜÒ»°ã£¬Á¬SQLÈ«³ÆÊÇʲô¶¼²»¶®£¬»¹ºÃÒâ˼×Ô³ÆÊìÁ·ÔËÓÃMYSQL£¬°¦£¡
¹ýÍêÄ꣬Ҫ¿ªÊ¼ÎªÊµÏ°¶ø±¼²¨ÁË¡£
ÍøÁú¿´À´ÊÇûϣÍûÁË¡£
Ö»ÄܽøÒ»Ð©±È½ÏÒ»°ãµÄ¹«Ë¾Ñ§Ï°Ñ§Ï°ÁË¡£
´Ó½ñÌ쿪ʼ£¬ÈÏÕæ¿´PHP100µÄ×îм¸¸öÊÓÆµ¡£
¿ªÊ¼Í¨¶ÁDZµÄ³ÌÐò£¬×¢½âÉÏ ......

»ù´¡PHPÓ﷨ѧϰ£º³£Á¿£¬±äÁ¿

±¾ÎÄת×Ô http://hi.baidu.com/kxw102/blog/item/f1303188d9c148bb0e2444f2.html£¬¸Ðл×÷ÕߵķÖÏí
ÔÚ
PHP
ÖУ¬»ù±¾Êý¾Ý¿ÉÒÔ·ÖΪ³£Á¿ºÍ±äÁ¿Á½ÖÖ¡£³£Á¿ÃûºÍ±äÁ¿Ãûͨ³£³ÆÎª±êʶ·û¡£(
ÐèҪעÒâµÄÊDZêʶ·û±ØÐëÒÔ×Öĸ»òÕßÏ»®Ïß¿ªÍ·£¬²¢ÇÒÖ»ÄܰüÀ¨×Öĸ¡¢Êý×ÖºÍÏ»®Ïß
)
ÀýÈ磺
my_function¡¢Size¡¢
_BlackµÈµÈ
1.ÏÂÃæËµÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ