Understanding Web-Server

Why do you need a web-server?

All browsers understand only HTML,CSS and JS. The browser cannot interpret PHP or any other server side language. So you need some mechanism to convert PHP to HTML.

This is taken care by web-server. apache is the open source webserver used to serve PHP.

How to use a web-server?

Install the web-server then you need to configure it so as to have a directory(htdocs) to put all your code so that it can interpret and make browser understand the stuff.

Once you have configured it and start your webserver you can open it in a browser and can see the webserver serving HTML code even though you give it PHP code.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s