1. 下载安装PHP, 和fastcgi http://www.iis.net/downloads/microsoft/fastcgi-for-iis
2. 下载安装PHPmanager http://phpmanager.codeplex.com/
3. 从Phalcon下载相应的dll
4. 从该链接下载phalcon例子项目代码 https://github.com/phalcon/invo
5. 新增web.config文件放到项目下的public文件夹下,web.config内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?_url=/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
6. 打开public/index.php文件,增加下面语句:在index.php中最后一个$di->set 后面增加下面语句
//Setup a base URI so that all generated URIs include the "tutorial" folder
$di->set('url', function(){ $url = new \Phalcon\Mvc\Url(); $url->setBaseUri('/public/'); return $url; });
到此就可以正常使用phalcon了。