<?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); ?> "); ?>
$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);
.....');