+ 3
What do i need to compile and run php?
Sololearn says i need to download a web server but i don't know what a web server is, why i need it and how it works neither (at first look seems complicated). Help please.
9 Answers
+ 7
Of you have a Windows Computer and like total test your PHP Scripts, ist XAMPP
+ 6
because the browser translates it.
+ 6
A server is a machine with a server operating system like Linux or Windows and - in case of a webserver - the software Apache or NGINX. the browser is a software on your computer or smartphone, e.g. internet explorer, chrome or Firefox. you need a browser to display webpages. the server holds those pages and serves them to you.
+ 5
a webserver is hosting the files and Web apps of your server. You need it because php runs on a server not a client. Apache supports php
+ 4
html does not need a server because it can also run in the file protocol, which loads the file directly from the hard drive and renders it in the Webbrowser, there is no step with a server involved
+ 4
Final question: difference between server and browser?
btw thank you your help was really precious
+ 4
The browser basicly displays what it gets
for example: it gets the html file provided by a server and displays all of it
The server as said before provides the data to the browser. The server also manages things like php or mysql. you might ask, and why do I need a server? why don't I just load it directly from the hard drive. well, that's a good question it's because it handles the loading over the Internet to your browser.
The file protocol skips the server step and loads it directly from your hard drive because html files don't need to run php code on the server and the data does not need to be transfered through the internet
+ 3
and why HTML does not need a server?
+ 3
CodeAnywhere.com is an 'easy' way to fire up a PHP box and get a feeling for setting up your own. And you can safely break it.