iis部署php网站的办法:起首启动iis效劳器,关上IIS效劳器;而后进入页面填写网站相干内容;接着解决顺序映照;最初设置默许文档为“index.php”便可。
保举:《PHP视频教程》
一、启动iis效劳器,关上IIS效劳器
关上IIS效劳器,点击网站,右击“增加网站”
二、创立网站
点击“增加网站”后,进入页面填写网站相干内容,如:网站称号、物理门路(网站所正在文件夹),点击“确定”创立胜利
三、PHP设置
点击创立好的网站,点击“解决顺序映照”,点击右侧的“增加映照模块”,正在弹出层中输出对应的参数,点击确认
设置默许文档
点击“默许文档”,鼠标右击“增加”按钮,增加默许文档,输出index.php,点击“确定”增加
四、装置urlrewrite
五、应用URL重写
点击“URL重写”,点击右侧的“导入规定”,抉择要导入的规定文件,点击使用便可
使用规定后,网站所正在根目次会天生一个web.config文件,我这个用的是thinkphp的.htaccess文件导入的规定
文件内容:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="已导入的规定 1" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <handlers> <add name="php-cgi" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="D:\phpStudy\php56n\php-cgi.exe" resourceType="File" /> </handlers> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>
以上就是iis怎样部署php网站的具体内容,更多请存眷资源魔其它相干文章!
标签: php php教程 php故障解决 php使用问题 IIS
版权声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。
抱歉,评论功能暂时关闭!