123 234 abc
<?php $con = mysql_connect("localhost","root","111111"); if (!$con) { die('Could not connect:' .mysql_error()); } mysql_select_db("zzadmin",$con); $file=file('2.txt'); $arrlength=count($file); for ($x=0;$x<$arrlength;$x++) { $b=$file[$x]; $sql = "INSERT INTO csdn_db (username,passwd,email) SELECT username,passwd,email FROM csdn where passwd like '$b%'"; var_dump($sql); echo "<p>"; ?>
<?php $con = mysql_connect("localhost","root","111111"); if (!$con) { die('Could not connect:' .mysql_error()); } mysql_select_db("zzadmin",$con); $file=file('2.txt'); $arrlength=count($file); for ($x=0;$x<$arrlength;$x++) { $c=$file[$x]; $b=rtrim($c); //添加函数 $sql = "INSERT INTO csdn_db (username,passwd,email) SELECT username,passwd,email FROM csdn where passwd like '$b%'"; var_dump($sql); echo "<p>"; >