Home > Article > Backend Development > PHP POST下传,无法读取下传的字符串
PHP POST上传,无法读取上传的字符串
本地c#写的 用WebClient类http://1.liuruitao.sinaapp.com/test.php?name={0}通过这个url上传的,网页那边
if($_SERVER['REQUEST_METHOD']=="POST")
{
// $s=json_encode($_post)
$s=$_GET["name"];
echo "hello world!!";
echo $_POST["name"];
$conn=mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
if(!$conn)
die("connect fail".mysql_error());
mysql_select_db('app_liuruitao',$conn);
$sql = "insert into $db values ('3344556677',$s,3,'4',5,'6','7','8','9')";
mysql_query($sql,$conn);//借SQL语句插入数据
mysql_close();//关闭MySQL连接
echo "insert success";
}
就是无法正确获取上传的name里面的字符串插入到数据库中,大家帮帮忙谢谢了