How can I enable the MySQLi extension in PHP 7?

To enable the MySQLi extension in PHP 7, you need to follow these steps:

  1. Open your PHP configuration file (php.ini).
  2. Find the line that reads: ;extension=mysqli.
  3. Remove the semicolon (;) from the beginning of the line to uncomment it. It should now look like this: extension=mysqli.
  4. Save the changes to your PHP configuration file.
  5. Restart your web server for the changes to take effect.

If you are using a version of PHP earlier than PHP 7, you can use the following line to enable the MySQLi extension:

extension=php_mysqli.dll

Watch a course Learn object oriented PHP

Note that the MySQLi extension is enabled by default in PHP 7, so you may not need to perform these steps if you are already using PHP 7.

We hope this helps! Let us know if you have any other questions.