Intro to php. Install local environment
You can download php from official website. But there is a way easier – local environment. It it desktop application, which includes web server, php and mysql (sometimes there are much more tools in such applications).
Examples of local environments:
denwer, wamp, xampp and open server.
These applications are free and easy to install.
In the end of our lesson we wrote our first php script. By the way you can not open php scripts in browsers directly. When you install necessary tools, you must enter localhost. in browser. You’ll see “welcome” page or files list on your local web server. Next, find out, where your php scripts is situated. If it is situated in the root directory of web server, you can refer it to its name. For example localhost/yourscript.php.
In fact, web server always sees files with index name (index.html, index.php). They runs at once.
One more problem that can interfere your web server work is network protocol. The fact is that apache apache and skype uses one network port – 80. That’s why you neen to forbid skype using 80 port. To do this you must enter: Tools->Settings->Additionally->Connection and uncheck “For adding connections use 80 or 443 port”.
Code lesson
<?php
phpinfo();
0 Comments