[英]Laravel upload to cpanel css issue
I am trying to upload a laravel project to cpanel hosting server.我正在尝试将 Laravel 项目上传到 cpanel 托管服务器。 My laravel version is 5.3 and php version on the server is 5.6.我的 Laravel 版本是 5.3,服务器上的 php 版本是 5.6。
What I have done is:我所做的是:
require __DIR__.'/../../online_system/bootstrap/autoload.php';
编辑require __DIR__.'/../../online_system/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../online_system/bootstrap/app.php';
编辑$app = require_once __DIR__.'/../../online_system/bootstrap/app.php';
Home page is working fine , but as long as I click login or register provided by laravel, then the website looks plain without css load.主页工作正常,但只要我点击 laravel 提供的登录或注册,那么网站看起来很简单,没有 css 加载。
How can I solve this problem?我怎么解决这个问题?
试试看
<link rel="stylesheet" type="text/css" href="{{ url('online_system/css/styl.css') }}" />
我想这可以解决问题:
<link rel="stylesheet" type="text/css" href="/public/css/style.css"/>
如果您的项目在服务器上并更改您的视图,那么清除视图缓存:
php /path_to_your_project/ artisan view:clear
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.