| David Haynes 2006-03-27, 7:56 am |
| Steff wrote:
> I would to understand what does apache do after all. I mean to set up PHP we
> need to have an apache server working as well. Why's that?
>
> I can display the result of some HTML code in my browser without apache
> though...
Apache is responsible for having the conversation with your browser.
It goes like this (very rough outline):
Your browser uses the URL you supply to send an HTTP request to Apache.
Apache sees that the request is for a PHP page.
Apache uses the php module to run the PHP page code and accepts the
output from PHP as HTML code.
Apache then uses the HTTP protocol to send the HTML code to your browser.
Your browser interprets the HTML code and displays the page.
You *can* run PHP without apache but only if you don't want to view the
resulting HTML over a network with a browser.
-david-
|