时间:2022-03-02来源:www.pcxitongcheng.com作者:电脑系统城
然后一直点击下一步,直到下图所示:
选择上如下图所选:
然后下一步安装上即可。
新建网站如下图所示:
点击基本设置,按要求填写即可:
双击处理映射程序
弹出如下图所示:
点击添加模块映射,填写如下图所示:
接下来:
双击默认文档,添加index.php:
链接:https://windows.php.net/downloads/releases/php-7.3.17-nts-Win32-VC15-x64.zip,注意php-7.4对tp5.1支持有问题,所以最好用php7.3
把上面的复制一份,修改为php.ini
修改php.ini如下所示:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
zlib.output_compression = On //启用Gzip压缩 max_execution_time = 30 //最大执行时间,按需改 memory_limit = 128M //内存大小限制 display_errors = Off //关闭报错 error_log = e:\temp\php_errors.log post_max_size = 100M //最大POST大小,按需改 extension_dir = "e:\PHP\ext" //ext文件夹位置 cgi.force_redirect = 0 cgi.fix_pathinfo=1 fastcgi.impersonate = 1 fastcgi.logging = 0 upload_tmp_dir = e:\temp upload_max_filesize = 100M //最大上传大小,按需改 date .timezone = Asia/shanghai //时区 session.save_path = "e:\temp" session.auto_start = 0 sys_temp_dir = "e:\web\temp\tmp" |
开启扩展:
extension=xxxxx //去掉前面的分号以启用对应扩展
我打开了这些:curl、fileinfo、gd2、gettext、mbstring、exif、mysqli、openssl、pdo_mysql、xmlrpc
win+R 输入 regedit
在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp位置
修改注册表
把MajorVersion的值改为9
下载:https://www.iis.net/downloads/microsoft/url-rewrite
并安装即可。
在public文件夹下添加web.config,并填写如下内容。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<? 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 > < defaultDocument > < files > < add value = "index.php" /> </ files > </ defaultDocument > </ system.webServer > </ configuration > |
如果:tp5报错:Non-string needles will be interpreted as strings in the future
修改错误:.\extend\XBase\Column.php
$this->name = (strpos($name, 0x00) !== false ) ? substr($name, 0, strpos($name, 0x00)) : $name;改为:
$this->name = (strpos($name, chr(0x00)) !== false ) ? substr($name, 0, strpos($name, chr(0x00))) : $name;
整个流程走下来,tp5可以完美运行到服务器上。
2024-07-07
myeclipse怎么导入tomcat教程2024-07-07
myeclipse如何启动tomcat2024-07-07
myeclipse如何绑定tomcat上线了一个小的预约程序,配置通过Nginx进行访问入口,默认的日志是没有请求时间的,因此需要配置一下,将每一次的请求的访问响应时间记录出来,备查与优化使用....
2023-03-17