Cpanel 原生 php 与某种 laravel [已关闭]

问题描述 投票:0回答:1

嗨,我在这里有我的程序,但我不知道如何在 cpanel 中上传此类程序,因为它有一个 cmd 进程可以像这样运行,例如 php -S localhost:8000 -t public 并且我还安装了一个作曲家也运行我的程序请帮助我enter image description here请参阅下面的更多图片

(https://i.stack.imgur.com/OSoks.png)(https://i.stack.imgur.com/QUMXK.png)

php web upload cpanel vanilla-forums
1个回答
0
投票

上传到public_html文件夹并设置apache或nginx,以便它会在public文件夹中查找index.php。另一种方法是在 public_html 中创建 .htaccess 文件,以便它将查询重定向到项目的公共文件夹。

可能的 .htaccess 文件可能如下所示:

RewriteEngine On
RewriteRule ^$ public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]

附注你的项目根本不是 Laravel。这是简单的普通 PHP。

© www.soinside.com 2019 - 2024. All rights reserved.