Código PHP:
<form name=fcarga action=Mantenimiento.php method=POST>
<p>Archivo : <input type=file name=fileSQL size=50 ></p>"
<p> </p>
<input type=submit name=cargarsql value=Cargar class= 'Boton'>
</form >
}
if ($cargarsql == "Cargar" && $fileSQL){
$sql = implode('', file($fileSQL));
echo$sql;
$sql_sentencias=explode(';',$sql);
echo"-------";
echo$sql_sentencias;
echo" conectas a tu BD .. selecionas tu BD ...";
foreach ($sql_sentencias as $sentencia_sql){
mysql_query($sentencia_sql) or die ('Error ejecutando:'.$sentencia_sql.'<br>Mysql dice: '.mysql_error());
}
exit();
}
Warning: file(Respaldo 17-02-2007.txt) [function.file]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\www\Colegio\Mantenim iento.php on line 229
Warning: implode() [function.implode]: Bad arguments. in C:\apachefriends\xampp\htdocs\www\Colegio\Mantenim iento.php on line 229
-------Array conectas a tu BD .. selecionas tu BD ...Error ejecutando:
Mysql dice: Query was empty
de antemano muchas gracias.... ojala me puedan ayudar