简体   繁体   中英

How can I use interface of PHP that is installed on the linux operating system in window operation system?

I want to use the Windows operating system to develop my PHP code, but PHP is installed on the Linux operating system. My PHP code runs on the Linux operating system, so I want to use a Linux provided interface of PHP. How do I do this?

If I understand correctly, you want write your code on Windows, but run it on Linux. In this case you can use Vagrant or Docker . I am not experienced with docker, but I can provide some information about Vagrant:

From Vagrant docs :

Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the "works on my machine" excuse a relic of the past.

It allows you to simulate real server inside your Windows environment, by running virtual machine. You can setup shared folders, so you can do your code writing inside your Windows, and run it inside virtual machine, which could be Linux environment with installed LAMP stack.

To learn more about it, there is plenty of articles on the internet, for example: https://www.sitepoint.com/getting-started-vagrant-windows/

You can also use puphpet to easily setup configuration for your virtual machine.

By default, shared folders in vagrant are very slow, especially in Windows, to make it faster you can use NFS file system. There is a plugin for Windows called winnfsd .

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