开发者

Working with PHP offline

Is there a tool or extension for a browser to working with PHP offline? I read开发者_如何学JAVA about you need to install an Apache server.

Is there an easier way to view offline in browser to see how the PHP code executes?


XAMPP sets up a local install of MySQL, PHP, and Apache that you can develop on.


In Windows, install XAMPP or WAMP
Which are Windows Apache Mysql and Php bundles

In Linux install LAMP
Which is a Linux Apache Mysql and Php bundle

Both of which could help


Nope, simpler than xampp is not possible.


This won't be much use to you now, but there has been recent talk (and submission of code) of providing a built-in web server into PHP itself.

See the RFC at https://wiki.php.net/rfc/builtinwebserver

You could then write your script (e.g. app.php), execute php -S localhost:8000 to start the web server and then see the results in your browser at http://localhost:8000/app.php.


In the mean time, you can install Apache/PHP/MySQL/etc. on your local box, as the other answers have suggested, either manually or with a package like XAMPP.


No. PHP code must be processed by a PHP engine, and the easiest way to do so in a web environment is to use a web server. It does not need to be httpd, but it must be something.


if you are on a Mac, you have Apache installed already. the additional instructions you will need to add PHP and MySQL database server can be found here http://www.entropy.ch/software/macosx/

if you are using Windows, XAMPP is a self contained Apache/MySQL/PHP environment that runs as a stand alone application.

that should get you started. good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜