From 6324a847afa2c7b5529be7fcaeda702ac6ac2500 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Tue, 18 Nov 2025 16:38:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.htaccess | 1 + src/.travis.yml | 42 ------------------------------------------ src/.user.ini | 44 +++++++++++++++++++++++++++++++++++++++++++- src/nginx.htaccess | 10 ++++++---- 4 files changed, 50 insertions(+), 47 deletions(-) delete mode 100644 src/.travis.yml diff --git a/src/.htaccess b/src/.htaccess index e69de29bb..131cd103d 100644 --- a/src/.htaccess +++ b/src/.htaccess @@ -0,0 +1 @@ +# 针对 Apache 的配置文件 \ No newline at end of file diff --git a/src/.travis.yml b/src/.travis.yml deleted file mode 100644 index 80ef29106..000000000 --- a/src/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -sudo: false - -language: php - -branches: - only: - - stable - -cache: - directories: - - $HOME/.composer/cache - -before_install: - - composer self-update - -install: - - composer install --no-dev --no-interaction --ignore-platform-reqs - - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip . - - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0" - - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0" - - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0" - - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip . - -script: - - php think unit - -deploy: - provider: releases - api_key: - secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw= - file: - - ThinkPHP_Core.zip - - ThinkPHP_Full.zip - skip_cleanup: true - on: - tags: true diff --git a/src/.user.ini b/src/.user.ini index 5a00b3890..40f916617 100644 --- a/src/.user.ini +++ b/src/.user.ini @@ -1 +1,43 @@ -open_basedir=/www/wwwroot/myweb/newfwq/:/tmp/ \ No newline at end of file +; PHP Ini +; ============================================================================== +; 允许在不修改服务器主 php.ini 的情况下,针对特定目录进行 PHP 配置 +; 可以覆盖或修改特定的 PHP 指令 +; 一、可以达到项目环境隔离 +; (1)不同项目可以使用不同的 PHP 配置 +; (2)避免影响服务器上其他网站 +; 二、便利性 +; (1)开发环境可以开启错误显示,生产环境关闭 +; (2)部署时无需修改服务器配置 +; (3)方便项目迁移 +; 三、安全性 +; (1)可以限制用户访问的目录 +;=============================================================================== + + +; 开发环境:错误显示 +display_errors = On +log_errors = On + + +; 允许访问的目录, 使用: 分隔,使用绝对路径 +; open_basedir=/www/wwwroot/myweb/newfwq/:/tmp/ + +; 上传文件大小限制 +; upload_max_filesize = 50M +; post_max_size = 50M + +; 执行时间限制 +; max_execution_time = 300 + +; 内存限制 +; memory_limit = 256M + +; 错误显示 +; display_errors = Off +; log_errors = On + +; 文件上传目录 +; upload_tmp_dir = /tmp + +; 会话配置 +; session.gc_maxlifetime = 1440 \ No newline at end of file diff --git a/src/nginx.htaccess b/src/nginx.htaccess index 0a57e0668..b3bcad25f 100644 --- a/src/nginx.htaccess +++ b/src/nginx.htaccess @@ -1,6 +1,8 @@ +# Nginx 配置片段 location / { -if (!-e $request_filename) { -rewrite ^(.*)$ /index.php/$1 last; -break; -} + # 如果文件不存在,则重写到 index.php 文件 + if (!-e $request_filename) { + rewrite ^(.*)$ /index.php/$1 last; + break; + } } \ No newline at end of file