2011-06-13 53 views
1

我已經安裝了PHP 5.3.6,有沒有辦法讓WebMatrix利用已安裝的PHP?Webmatrix預裝PHP

感謝

+0

更多詳情請致電 – Gordon 2011-06-13 10:59:07

回答

2

WebMatrix中使用IIS Web服務器快車(IIS快速獲取與WebMatrix中一同安裝),你需要配置IIS Express使用安裝了PHP。從IIS Express安裝文件夾(%programfiles%\ IIS Express)運行以下兩個命令並重新啓動WebMatrix。

  1. Appcmd.exe的設置配置/section:system.webServer/fastCGI /+[fullPath='c:{php_installation-folder}\php-cgi.exe']

  2. Appcmd.exe的集config /section:system.webServer/handlers/ + [name ='PHP_via_FastCGI',path ='.php',verb ='',modules ='FastCgiModule',scriptProcessor ='c:{php_installation-folder} \ php -cgi.exe',resourceType ='Unspecified']

+0

謝謝!這對我很有用,雖然WebMatrix說我正在使用未知版本的PHP。 – Kieran 2013-01-24 06:45:42

+1

我發現了兩件事:PHP設置%PHPRC%到我的php安裝目錄,這很方便,路徑應該設置爲'\ *。php'和動詞'\ *'。所以在兩者之間: 'Appcmd.exe的設置配置/section:system.webServer/fastCGI/+ [FULLPATH = '^%PHPRC ^%PHP-cgi.exe文件']' 和 'Appcmd.exe的集config /section:system.webServer/handlers /+[name='PHP_via_FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='^%PHPRC^%php-cgi。 exe文件」,= resourceType爲 '未指定']' – Kieran 2013-01-24 06:53:47