Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: mack
I want to use PHP as the scripting language in HTML and I want to view the results offline to verify the PHP code..
I tried searching on google but I am a bit confused.
The results tell that I ll have to install Apache first and then download and configure PHP with it.
Now I already have XAMPP control panel installed on my system for using Joomla and it comes with apache and PHP I guess..
DO I need to download and install Apache and PHP separately or I can use it from XAMPP.
And how to configure exactly ? I have just started out..
And my OS is Windows XP
One thing you should be mindful of, is that PHP is a server side language that (among other things) can provide content for the user, whether that's (X)HTML, XML, plain text, etc. It's not in HTML. HTML is just a markup language that browsers use to format a document. One of the typical tasks that PHP can perform is to read records from a database (such as MySQL), take that data and use it to create a webpage on-the-fly. So the HTML is actually in the PHP script.
Here's a quick breakdown of a typical client / server transaction with Apache and PHP:
1) The user requests a webpage via the URL (e.g. example.com/index.php)
2) The server (Apache) receives the request and looks for the document. If that document is one that is recognized as a specific application type (in this case PHP), the Apache PHP module will parse the file and perform whatever task is coded there. In doing so, let's say it creates an HTML document with certain information just retrieved from a database.
3) Apache then returns the dynamically created HTML document to the user.
4) The user's browser determines the content type based on the formatting in the returning document and displays the content.