Edit (Ho letto ora)
@giuseppeiemma: Ops..pensavo che tu me lo volessi dare a scopo di fare "pubblicità"
...cmq ok Scusami e..Grazie! :D
=========================
Ho risolto così:
Codice PHP:
$filesql = implode('', file("query.sql"));
$install = mysql_query("$filesql");
Ma ora ho un altro problema..in locale la funzione mail() non funziona giusto? (io uso Wamp Server) e ho provato a modificare le impostazioni di php.ini..
Codice PHP:
[mail function]
; For Win32 only.
SMTP = mail.libero.it
smtp_port = 25
; For Win32 only.
sendmail_from = email@localhost.root
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
Ho messo smtp di libero, visto che è il mio "provaider" (-si chiama così giusto?-)...ma non funziona..ho cercato sul forum e c'è una risposta che dice di usare ini_set...ma niente! Non c'è un modo per bypassare questa cosa e darmi la risposta "TRUE"??
Codice PHP:
//indirizzo del server SMTP
ini_set('SMTP' , 'mail.libero.it');
//la porta del server SMTP
ini_set('smtp_port' , '25');
//indirizzo e-mail del mittente
ini_set('sendmail_from' , 'email@localhost.root');
$header = "MIME-Version: 1.0\n";
$header .= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
$mail = @mail("$email", "OGGETTO", "TESTO", $header);
if($mail) {
echo "<b>---> Email con i dati Inviata! <---</b><br /><br />";
} else {
echo "<b>Email con i dati <u>NON</u> Inviata!!</b><br /><br />";
}
Ho messo la @ per evitare l'errore davanti a mail(..ma invece per far si che passi?
Ossia dare Email con i dati Inviata??
Grazie 1000...ciao davide! ^^