第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

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

redirect() 將整個 URL 添加到根目錄

redirect() 將整個 URL 添加到根目錄

PHP
翻翻過去那場雪 2021-08-27 09:45:56
當我使用 header('Location: index') 時,我得到“l(fā)ocalhost/pos/index”,當我使用 redirect('index') 時,我得到“l(fā)ocalhost/pos/localhost/pos/index”。我在 Windows 10 上使用 XAMPP?!發(fā)ocalhost/pos”是我的應(yīng)用程序的根。我嘗試使用“刷新”和“位置”無濟于事。我嘗試將控制器添加到 URI(因此使用 redirect('main/index') 代替),我在 URI 的開頭嘗試了一個斜杠 - 每次,redirect() 都以我之前指出的這種奇怪的方式工作。當我嘗試從 redirect() 主體復制 header() 代碼時,它實際上按預期工作...redirect('index'); // Does the weird repeated URLheader('Location: index'); // Works fineheader('Location: '.$uri, TRUE, $code); // Works fine, even though it's redirect()'s body when $metod == 'location'重定向('索引'):預期:http://localhost/pos/index結(jié)果:http://localhost/pos/localhost/pos/index
查看完整描述

1 回答

?
慕碼人2483693

TA貢獻1860條經(jīng)驗 獲得超9個贊

設(shè)置你的base_urlin config.php,我猜你的項目名稱pos應(yīng)該是這樣的:

$config['base_url'] = 'http://localhost/pos/';


查看完整回答
反對 回復 2021-08-27
  • 1 回答
  • 0 關(guān)注
  • 307 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號