PHP and MySQLi
I don't know if it is simply disabled on repl.it or I am doing something wrong but I cannot connect to my SQL database through my PHP files. This is what I am currently doing:
But whenever I run the page with the connection script I get the following error:
Uncaught Error: Class 'mysqli' not found in my-project-here
Seems debatable whether you can do what you ask. Here is a comment I came across by Googling: https://repl.it/talk/ask/How-do-I-use-a-database-with-the-new-php-server/15708
@Lightcaster5 I think I understood what you meant. My answer said I don't think you can do this and I included a link to an old conversation that basically said this. If you find an answer that lets you do such a hook up let me know. All the best.
@malvoliothegood Thanks, after a bit of testing and using
echo phpInfo(); I've found that
$pdo = new PDO(Stuff here); works but throws an exception because there are
No Drivers Found and in
phpInfo(); under the
PDO section it says
No Value for where it is saying if drivers are enabled. Thanks for the help!
@Lightcaster5 Thanks for the info. You can easily develop using PHP, and MySql applications using the XAMPP, WAMP or LAMP packages. I have used the first two in the past and built a WordPress site locally before hosting it on the web. I have also used it to teach programming and relational databases when I was a teacher.