我有多个基于PHP的项目。有些要求PHPVersion5.x运行,而另一些则严格要求PHP7.0或更高版本。我正在同时处理这些问题。是否有一种方法可以运行多个PHP版本,以便在处理不同项目时在它们之间切换。
发布于 2019-03-12 05:49:56
尝试以下步骤:
如果您没有下载libphp7.so
library/blob/master/libphp7.so
发布于 2020-12-22 06:55:25
>> Open C:\xampp\apache\conf\extra\httpd-xampp.conf
>> Write Following code at Bottom of this (httpd-xampp.conf) file
ScriptAlias /php56 "C:/xampp/php56"
<Directory "C:/xampp/php56">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
>> Open C:\xampp\apache\conf\extra\httpd-vhosts.conf\httpd-vhosts.conf
>> Create a virchual host in Different post By Writing Following code
<VirtualHost *:8081>
UnsetEnv PHPRC
<FilesMatch "\.php$">
php_flag engine off
SetHandler application/x-httpd-php5_6
Action application/x-httpd-php5_6 "/php5_6/php-cgi.exe"
</FilesMatch>
DocumentRoot "C:/xampp/htdocs/myphp5_6_project"
</VirtualHost>
>> Create a folder "myphp5_6_project" in htdocs of xampp
>> Open C:\xampp\apache\conf\httpd.conf
>> Write Listen 8081 (any where or Below Listen 80 line)
>> Restart Apache Serviceshttps://stackoverflow.com/questions/55114806
复制相似问题