这个问题是在根据某个手注教程学习时遇到的问题,链接为:https://bbs.ichunqiu.com/thread-9668-1-1.html
3.5节处,这里我按照他的命令,输入select "<?php echo 'test'; ?>" into outfile "F:\\www\\test.php";
,先是手注,失败:
然后我直接在MYSQL服务器后台直接输入命令,结果仍然提示错误:
求问这是什么原因?
我的php源代码为:<?php
if(isset($_GET["id"])){
$con = mysql_connect("localhost:3306","root","root");
if(!$con)
{
die('Could not connect:'.mysql_error());
}
mysql_select_db("ichunqiu",$con);
$querry = "select * from users where id =".$_GET['id'];
$sql = mysql_query($querry,$con);
var_dump($sql);
//$result = mysql_fetch_array($sql);
echo "<table class='itable' border='1' cellspacing='0'
width='300px' height='150'>";
echo "<tr>";
echo "<td>id</td>";
echo "<td>username</td>";
echo "<td>password</td>";
echo "</tr>";
//遍历查询结果
while($result=mysql_fetch_array($sql))
{
echo "<tr>";
echo "<td>".$result[0]."</td>";
echo "<td>".$result[1]."</td>";
echo "<td>".$result[2]."</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
echo $querry;
}
?>
|