0

I did a straight connection to PDO. this works on my computer but not online when I upload. Why is that? Is it compulsory that create a class for it.

$conn=new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass));

when I go online, it gives me "Fatal error: Class 'PDO' not found in..."

1 Answer 1

1

Please check whether the php-pdo Extension is both installed and active. You can either use phpinfo or get_loaded_extensions for this. In case it is not active, check whether it is installed and active it in your php.ini; otherwise install it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.