In: Computer Science
PHP Language
I have XAMPP and I don't know how to display my PHP code. For instance, when I create a basic HTML webpage I just open the code into a web browser and it shows me a basic web page. When I try to show a PHP calculation it doesn't show. What are the steps in displaying my PHP doc?
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Start the XAMPP program. When started, XAMPP loads itself into your icon tray. The icon is orange with a white bone-like shape in its center. Single-click the icon to expand the Control Panel. Click on the "Start" button next to "Apache" to start your Apache Web server. When Apache is running, the word "Running" will appear next to it, highlighted in green. Also start "MySQL" if your PHP scripts depend on a MySQL database to run.
Place your PHP files in the "HTDocs" folder located under the "XAMMP" folder on your C: drive. The file path is "C:\xampp\htdocs" for your Web server. Make sure your PHP files are saved as such; they must have the ".php" file extension. Open up any Web browser on your desktop and enter "localhost" into the address box. The browser will open a list of files stored under the "HTDocs" folder on your computer. Click on the link to a PHP file and open it to run a script.
Create any folders you need to test PHP files in under the "HTDocs" folder. If you create a folder named "scripts," then use the address "localhost/scripts" to open them in your browser.
Kindly revert for any queries
Thanks.