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> ......
WindowsÏÂPHPµÄ°²×°ËäÈ»¼òµ¥£¬µ«Èç¹û²»×¢Òâ·½·¨£¬ÈÔÈ»»áÈÃÄãÍ·ÌÛ¡£´ËÍ⣬PHP 5.2°æ±¾Óë֮ǰ4.x°æ±¾Ò²ÓÐһЩ²»Í¬£¬ËùÒÔÓбØÒª¼Ç¼һÏ£¬±ÜÃâÏ´ÎÍü¼ÇÁËÕâÑùµÄ°²×°ÅäÖ÷½·¨¡£
²½ÖèÒ»£ºÏÂÔØphp 5.2 for windowsµÄ°²×°°ü£¬½âѹÖÁC:\php¡£×¢Òâ´Ë½âѹĿ¼¿ÉÒÔÊÇÔÚÈκÎÅÌÏ£¬È»¶øÄ¿Â¼Ãû²»Äܰüº¬¿Õ¸ñ£»
ÒÔÏÂÊÇphp5.2µÄÎļþĿ¼£º
......
how to install apache, PHP and MySQL on Linux
This tutorial explains the installation of Apache web server, bundled
with PHP and MySQL server on a Linux machine. The tutorial is primarily for SuSE
9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all
Linux-like operating ......
REQUEST_URI ·µ»ØµÄÊǰüÀ¨ºóÃæÊý¾Ý´®µÄµØÖ·£¬Èç index.php?str=1234 PHP_SELF ÊÇ index.php
--------------------------------------------------------------------------------
$_SERVER[’PHP_SELF’]ÔÚ¿ª·¢µÄʱºò³£»áÓõ½£¬Ò»°ãÓÃÀ´ÒýÓõ±Ç°ÍøÒ³µØÖ·£¬²¢ÇÒËüÊÇϵͳ×Ô¶¯Éú³ÉµÄÈ«¾Ö±äÁ¿£¬Ò²»áÓÐʲôÎÊÌâô?È ......