Running PHP file for the first time (Windows)
Running PHP file for the first time (Windows)
The simple way to execute PHP is to install and run a web server (included in XAMPP), create a PHP file, place it in a specific directory, and then run it by entering the address in a web browser.
Firstly, the Apache web server must be running without fail. It should appear as "STOP" with a red underline, as indicated below.
1.Directory for placing PHP files
Once XAMPP installation is complete, you will see two icons on your desktop.
The left icon is for server control, and the right icon opens the space for placing PHP documents when double-clicked.
By default, the installation address on Windows is as follows:
C:\xampp\htdocs
You must create and place your PHP files in this location without fail.
- 2.Creating and saving a PHP file
- - Open Notepad on Windows and enter the following:
Save the file with the name "test.php" in the desired location. The important thing is to select the file format as "All Files" and then save it.
- 3.Executing in a web browser
- - Open a web browser and enter the address and file name to view the execution screen.
※ If you are curious about the remaining parts of modifying the Apache web server configuration file mentioned in the previous post, please refer to the following address.
https://httpd.apache.org/docs/2.4/en/mod/directives.html



Comments
Post a Comment