Home > Article > Backend Development > How to use php source code?
The method of using the php source code is: first install the phpnow environment package; then copy all the source code to the htdocs folder in the package installation directory; finally import the database and determine the database connection parameters such as passwords, etc. Just the right one.
The method of using the php source code is:
All PHP programs use MYSQL. If there is no MYSQL, it cannot Use them.
First: Configure the database information and change it to what you need;
Second: Import the database;
Third: Install wamp5 Enter http://127.0.0.1/own file name
.
1: If it is PHP source code, when used on the 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, copy the source code to the folder controlled by the virtual host and use "http://virtual host address/" Come visit.
Related learning recommendations: PHP programming from entry to proficiency
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!