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²¿·Ö×Ö·û´®Ö®¼äÓÃ"." À´Á¬½Ó
Ïà¹ØÎĵµ£º
/***************************by garcon1986**************************/
form.html
<html>
<head>
<title>Upload File</title>
</head>
<body>
<form enctype="multipart/form-data" method="POST" action="uploader.php">
<label> ......
ÏîÄ¿ÉèÏë
ѧУ¸÷²¿ÃŵÄÍøÕ¾²¢·ÇÓõÄÒ»Ì×cmsϵͳ£¬ÐÐÕþ²¿ÃÅÓë¶þ¼¶Ñ§ÔºµÄÍøÕ¾ÊýÁ¿ÖÚ¶àÇÒ¿ª·¢ÈËÔ±µÄˮƽ²Î²î²»Æë£¬µ¼ÖÂÐÅÏ¢¼Ü¹¹±È½Ï»ìÂÒ¡£Í¨¹ýÒ»¸öÈ«¾ÖµÄ¹¤¾ßÌõʵÏÖȫУվµãÁ´½ÓÓ빫¸æ¶¯Ì¬¸üУ¨ÄÜÔÚÈκÎÒ»¸ö×ÓÕ¾µã¿´µ½×îÐµĹ«¸æ£©µÄ¹¦ÄÜ¡£
¹«¸æÄ£¿éÊý¾Ý¿âÉè¼Æ(Êý¾Ý¿â:globaltools)
Ê×ÏÈ´´½¨Ò»¸ö±íannouncement£¬°üÀ¨Ëĸö× ......
1.Appserv ÊÇʲô£¿
Appserv ÊÇPHPÍøÒ³¼ÜÕ¾¹¤¾ß×éºÏ°ü£¬¿ÉÒÔ½«ÍøÂçÉÏÃâ·ÑµÄ¼ÜÕ¾×ÊÔ´ÖØÐ°ü×°³Éµ¥Ò»µÄ°²×°³ÌÐò¡£ËüÌṩÁ˼òÒס¢¿ìËÙµÄPHPÔËÐл·¾³µÄ´î½¨»úÖÆ£¬¶ÁÕßÖ»Ðè°´ÕÕÆÕͨӦÓÃÈí¼þµÄ°²×°·½Ê½¾Í¿ÉÒÔÍê³ÉApache+MySQL+PHP+phpMyAdminµÄ°²×°ÓëÅäÖù¤×÷¡£
2.Appserv ÏÂÔØµØÖ·
http://www. ......
$_FILES['myFile']['name'] ¿Í»§¶ËÎļþµÄÔÃû³Æ¡£
$_FILES['myFile']['type'] ÎļþµÄ MIME ÀàÐÍ£¬ÐèÒªä¯ÀÀÆ÷Ìṩ¸ÃÐÅÏ¢µÄÖ§³Ö£¬ÀýÈç"image/gif"¡£
$_FILES['myFile']['size'] ÒÑÉÏ´«ÎļþµÄ´óС£¬µ¥Î»Îª×Ö½Ú¡£
$_FILES['myFile']['tmp_n ......