Friday, 4 March 2016

PHP: LOAD DATA LOCAL INFILE! PDO

This is a reminder for myself:


try {
// database connection
$db3 = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass,array(PDO::MYSQL_ATTR_LOCAL_INFILE => true));

} catch (PDOException $e) {
    echo "Connection failed: " . $e->getMessage();
}


will fix

Warning: PDOStatement::execute(): LOAD DATA LOCAL INFILE forbidden in  

No comments:

Post a Comment

Amazon

Donate

Donate Towards More Raspberry PI's for Projects