PHP mysqli set_local_infile_handler() Funzione
Definizione e utilizzo
La funzione set_local_infile_handler() / mysqli_set_local_infile_handler() imposta una funzione di callback per il comando LOAD DATA LOCAL INFILE.
Le attività delle funzioni di callback consistono nel leggere l'input dal file specificato in LOAD DATA LOCAL INFILE e riformattarlo nel formato compreso da LOAD DATA INFILE.
I dati restituiti devono corrispondere al formato specificato in LOAD DATA.
Sintassi
Stile orientato agli oggetti:
$mysqli ->
set_local_infile_handler(read_file)
Stile procedurale:
mysqli_set_local_infile_handler(read_file)
Valori dei parametri
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
read_func | Required. Specifies a callback function or objext that can take the
following params: stream - A PHP stream associated with the SQL commands INFILE &buffer - A string buffer to store the rewritten input into buflen - The maximum number of characters to be stored in the buffer &erromsg - If an error occurs you can store an error message in here |
Dettagli tecnici
Valore di ritorno: | VERO sul successo. FALSO in caso di fallimento |
---|---|
Versione PHP: | 5+ |
❮ Riferimento PHP MySQLi