# ThinkPHP **Repository Path**: wzjsabc/think-php ## Basic Information - **Project Name**: ThinkPHP - **Description**: ThinkPHP V6.1.4 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-18 - **Last Updated**: 2025-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ThinkPHP 6.0 > 运行环境要求 PHP7.2+,兼容 PHP8.1 [官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一 API 服务](https://docs.topthink.com/think-api) ThinkPHPV6.0 版本由[亿速云](https://www.yisu.com/)独家赞助发布。 ## 主要新特性 - 采用`PHP7`强类型(严格模式) - 支持更多的`PSR`规范 - 原生多应用支持 - 更强大和易用的查询 - 全新的事件系统 - 模型事件和数据库事件统一纳入事件系统 - 模板引擎分离出核心 - 内部功能中间件化 - SESSION/Cookie 机制改进 - 对 Swoole 以及协程支持改进 - 对 IDE 更加友好 - 统一和精简大量用法 ## 安装 ``` composer create-project topthink/think tp 6.0.* or composer create-project topthink/think:6.0.13 tp --prefer-dist --ignore-platform-reqs --no-audit --no-plugins ``` 如果需要更新框架使用 ``` composer update topthink/framework ``` ## Composer 相关 ``` # 完全清理所有缓存 composer clear-cache --all # 暂时关闭 secure-http(安装完成后再开启) composer config -g secure-http false # 关闭安全审计 composer config -g audit.block-insecure false # 检查 composer 配置 composer config -g --list # 配置 国内镜像源 阿里云: composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ 华为云: composer config -g repo.packagist composer https://repo.huaweicloud.com/repository/php/ ``` ## PHP 相关 ``` # 检查 PHP 版本 php -v ``` ## 路由重定向配置 ``` # 根目录public/.htaccess文件复制以下内容到.htaccess文件中 Options +FollowSymLinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] ``` ## 去掉路由地址中的 public ``` D:/phpstudy_pro/Extensions/Apache2.4.39/conf/vhosts/www.tp.com_80.conf DocumentRoot "D:/phpstudy_pro/WWW/www.tp.com/tp/public" ServerName www.tp.com ServerAlias FcgidInitialEnv PHPRC "D:/phpstudy_pro/Extensions/php/php7.3.4nts" AddHandler fcgid-script .php FcgidWrapper "D:/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe" .php Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted DirectoryIndex index.php index.html error/index.html ``` ## 文档 [完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content) ## 参与开发 请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。 ## 版权信息 ThinkPHP 遵循 Apache2 开源协议发布,并提供免费使用。 本项目包含的第三方源码和二进制文件之版权信息另行标注。 版权所有 Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn) All rights reserved。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 更多细节参阅 [LICENSE.txt](LICENSE.txt)