Home > Article > Backend Development > How to use php source code
PHP programs all use MYSQL. If you don’t have MYSQL, you can’t use them.
First: Configure the database information and change it to what you need;
Second: Import the database;
Third: Install wamp5 and enter http://127.0.0.1/your own file name.
Related recommendations: "php tutorial"
1: If it is PHP source code, when using it on a local computer. You must first install the phpnow environment package (attached below), which includes php mysql, etc. You can also use Thunder to search and download it. That kit is very easy to install, needless to say.
2: Copy all the source code to the htdocs folder in the package installation directory. The usage method is as in 3 above.
3: If it cannot be opened, please first confirm whether your database needs to be imported? If so, please use http://127.0.0.1/phpmyadmin/ to import the database. Then check whether the database connection parameters such as passwords in the database connection file config.php (open with Notepad, usually this file) are correct, otherwise change them.
4: If you have added a virtual host and want to run the php source code in the virtual host, then copy the source code to the folder controlled by the virtual host and use "http://virtual host address/" Come visit.
The above is the detailed content of How to use php source code. For more information, please follow other related articles on the PHP Chinese website!