亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

css 樣式在某些 url 路徑上中斷

css 樣式在某些 url 路徑上中斷

PHP
長風秋雁 2023-07-30 13:04:57
這是我的索引文件:<?phprequire_once 'lib/limonade.php';echo $root_dir;option('base_path',? ? ? ? ? $base_path);option('base_uri',? ? ? ? ? ?$base_uri);option('root_dir',? ? $root_dir);option('public_dir',? $root_dir.'/public/');我的 default_layout.php 文件引用 css 文件,如下所示:<link rel="stylesheet" href="public/css/bootstrap.css">我的 .htacces 文件也如下所示:<IfModule mod_rewrite.c>? Options +FollowSymlinks? Options +Indexes? RewriteEngine on? # if your app is in a subfolder? # RewriteBase /my_app/? # test string is a valid files? RewriteCond %{SCRIPT_FILENAME} !-f? # test string is a valid directory? RewriteCond %{SCRIPT_FILENAME} !-d? RewriteRule ^(.*)$? ?index.php?uri=/$1? ? [NC,L,QSA]? # with QSA flag (query string append),? # forces the rewrite engine to append a query string part of the? # substitution string to the existing string, instead of replacing it.</IfModule>有誰知道這種小項目的類似且更好的微框架,我只需要使用 api 或知道如何解決這個問題。
查看完整描述

1 回答

?
千巷貓影

TA貢獻1829條經驗 獲得超7個贊

像下面這樣使用它

<link rel="stylesheet" href="/public/css/bootstrap.css">

然后它將開始從根文件夾搜索


查看完整回答
反對 回復 2023-07-30
  • 1 回答
  • 0 關注
  • 168 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號