1. 程式人生 > >PHP在一個框架中使用另一個框架

PHP在一個框架中使用另一個框架

code main 中新 rul con .htaccess lena you 瀏覽器

  • 在當前框架中新建一個文件夾lee:
    mkdir  lee
  • 進入lee:
    cd  lee
  • 引入框架:
    composer  create-project
  • 寫rewrite文件:vim .htaccess

    <IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^lee/(.*)$ lee/index.php/$1 [QSA,PT,L]
    </IfModule>
  • 瀏覽器訪問:
    your-domain/lee/module/controller/method
  • PHP在一個框架中使用另一個框架