简体   繁体   中英

Can i run my website which is developed in php and mysql without apache server (without wamp or xampp ))?

我可以运行没有apache服务器(没有wamp或xampp)的用php和mysql开发的网站吗?

Technically, you can. But Apache is usually a good solution.

You can run your website using Apache directly, or with Xamp / Wamp / Mamp /Lamp, or even Nginx.

To use Apache directly you can do something like : sudo apt-get install php5 apache2 mysql-server libapache2-mod-php5

Otherwise, you could use Microsoft IIS.

PHP includes a built-in server using -S option of PHP. But this is a development server, do not use it in production.

To run PHP applications you have to install Apache, PHP and MySQL. In fact it is difficult for beginners to install these bundles separately and combine them to run PHP CODE. XAMPP does that for you with just a few clicks.

1) Install xampp
2) run xampp
3) save you file with php extension ie "test.php" in C:\\xampp\\htdocs folder
4) Now, in your web browser's address bar, type the address: http://localhost/test.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM