How php scripts are run (describe in detail, please).
I advise you to install VertrigoServ, launch the icon on the desktop, the vertrigo icon will appear in the tray, right-click on it, select the “WWW folder” item, the folder will open, delete all the contents from it, and copy the files of the script you need here, then go into the browser and go to http://127.0.0.1/ and look at the script!
- Download and install web server (apache+php).
- The web server (apache) is starting.
- PHP scripts are uploaded to the web server.
To study, it is enough to install a ready-made package. denwer.ru
Put XAMPP on drive C. Start the server (a shortcut will appear on the desktop after installation). Open the server folder on disk C, it contains the htdoc folder. Put the script in there. Then open a browser, write localhost/scriptname.php in it and see the result.
To execute (run) PHP scripts, you need a PHP interpreter that converts your code into native code and executes it.
To translate the results of your code in the browser, you need a “machine” that will send requests to the php interpreter and pass the result to your browser. These are IIS, APACHE, NGNIX, etc. Collectively referred to as a web server.
Accordingly, in order to “run” your script under Windows, you need the Apache+PHP[+MySQL] web server. Then you can safely write scripts and pass them through the php interpreter and apache.