ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.29k stars 1.35k forks source link

MYSQLI_OPT_LOCAL_INFILE Error #899

Open adrianlaraperez88 opened 4 years ago

adrianlaraperez88 commented 4 years ago

i need add this : mysqli_options($conn, MYSQLI_OPT_LOCAL_INFILE, true); We have in this class fixed this error: i need add this : mysqli_options($conn, MYSQLI_OPT_LOCAL_INFILE, true);

Unprepared Query Failed, ERRNO: 2000 (LOAD DATA LOCAL INFILE is forbidden, check mysqli.allow_local_infile

I do not have access into php.ini.

adrianlaraperez88 commented 4 years ago

Maybe this is a solution if not have: https://www.php.net/manual/en/mysqli.options.php

mysqli_options($mysqli,MYSQLI_OPT_LOCAL_INFILE,1); please I need know if this class have this option.

avbdr commented 4 years ago

you can use $mysqlidb->mysqli() function to get mysqli object and set options there

adrianlaraperez88 commented 4 years ago

yeah i see this:

$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, 1);

but maybe it is a good add function for set this option.