Servers usually run on more sophisticated versions of standard operating systems. Windows has a server version, OS X has a server version, and Linux is a full-fledged server operating system
Servers run web server applications such as Apache or Windows IIS. These applications take care of receiving client requests, finding the requested resources, and returning them to the clients (among other things)
PHP stands for “PHP: Hypertext Preprocessor”. (Yes, the name is recursive)
Allows us to add programming logic to our HTML pages, processed by our server application(s), that can produce custom HTML on demand.
Apache loads the PHP file and runs it through the PHP parser (application running on the server)
The PHP application runs the PHP code and generates the output as directed by the PHP code within the HTML file
The completed HTML-only file is returned by Apache to the browser via HTTP
A quick example Output after processing <html> <p>Hello there, ali </p> </html> File on server <html> <p>Hello there, <?php echo $USERNAME; ?> </p> </html> Don’t worry about the code, just remember that the PHP runs on the server and can create or modify the output displayed by the browser.
Client-side browsers do NOT understand server-side languages like PHP or .NET. They understand HTML. So the end output of almost all basic server-side web applications is going to be HTML.
We’re talking about a simple back and forth application design here; the client and server take turns driving the application. Other approaches, like AJAX, are more complex.
Remember where the different technologies live Server side Software that can interact with multiple clients and can run your PHP program to allow customized ‘conversations’ with multiple clients Client side Browsers that can display HTML and can interact with different servers via HTTP This is a bit of an oversimplification (in fact, it really oversimplifies modern professional web application development practice, so don’t leave today thinking you’re suddenly an application design architect) but it’s good enough for us to go on for now.