“Hello, World” in PHP displays nothing

后端 未结 6 1959
我寻月下人不归
我寻月下人不归 2020-12-07 03:21

I am new to PHP, just downloaded it, and wrote a \"Hello, World!\" program:


    

    

        
6条回答
  •  孤城傲影
    2020-12-07 03:53

    You'll have to pass it through a webserver of some kind, for example IIS or Apache, for it to work.

    PHP is a server-side language, thus you can't just open the PHP file in a browser. Instead, try googling some free PHP hosts, and upload your files there.

    You could for example go for these solutions that will provide you with what you need:

    • WAMP - http://www.wampserver.com/en/ (Windows)
    • XAMPP - http://www.apachefriends.org/en/xampp.html - (Windows, Mac, and Linux)

    Those solutions will install Apache, MySQL and PHP and allow you to play locally with PHP development. Later on, if you want to deploy your code, you will have to find an external host (or host it on your own computer).

提交回复
热议问题