Home > Article > Backend Development > Introduction to php operating process and principles
1. Use the script command line to run php
(1) Open cmd.exe (winkey+R)
(2) Find php.exe (just drag it into cmd)
(3) Enter the command php.exe -f "actual path of the file"
Note: Run the code php.exe -r "code"
A concept:
In the running mode of web software, always first On the client side (browser side), a request is initiated, and then the server side generates a feedback action (that is, "runs" the program), and therefore returns information to the browser - (response)
2. web operation Process
1. Enter the address in the browser and press Enter (send the request)
2 Find the corresponding web server according to the rules
(1) First, find the corresponding IP in the local hosts file
Location: operating system/system32/drivers/etc/
Note: You need to open the editor as an administrator to edit and save it
(2) If it is not found in hosts, go to the Internet to find the corresponding IP (DNS in the server)
(3) Still not found, terminate the request and return the "server not found" prompt
3. The web server obtains the corresponding file (that is, the requested file)
4. If necessary, modify the file Process (execution of PHP code)
5. Return the file (or execution result file) to the browser (return response)
6. The browser accepts the file
7. The browser processes the file (display/ Execution)
PHP web page operation principle
The above is the detailed content of Introduction to php operating process and principles. For more information, please follow other related articles on the PHP Chinese website!