标题: 一段php 找错
时间: 2014-08-20
<?php
file_put_contents("con.php","<?php
$con=mysql_connect({$_POST['ip']},{$_POST['user']},{$_POST['pad']});
if(!$con){
die('数据库连接失败!<br />原因:'.mysql_error());
}
mysql_select_db({$_POST['db']},$con);
?>
");
?>
『回复列表(15|隐藏机器人聊天)』
$txt="
<?php
\$con=mysql_connect('localhost','root','root');
if(!\$con){
die('数据库连接失败!<br/>原因:'.mysql_error());
}
mysql_select_db('eoo',\$con);
?>
";
file_put_contents("con.php",$txt);