我在Ubuntu(/opt/lampp
)上安裝了xampp,並在/home/mustafa/public_html
中創建了一個public_html文件夾(我認爲它是一個符號鏈接,我是新的linux)我把我的php文件和public_html
文件夾中的其他資源,問題是當我想要像圖片一樣的東西時,我得到一個403錯誤(禁止訪問),但其他文件可以像PHP,CSS,JS文件一樣。問題是什麼?我該怎麼辦?403獲取圖像但不是其他資源時出現錯誤
UPDATE
的ls -l /home/mustafa/public_html/templates/assets/images/
在終端輸出:
total 8
-rwxrwx--- 1 mustafa mustafa 4638 Feb 17 22:06 hbg.png
ls -l /home/mustafa/public_html/templates/assets/style/
total 16
-rw-rw-r-- 1 mustafa mustafa 1571 Feb 23 13:06 style.css
-rw-rw-r-- 1 mustafa mustafa 1567 Feb 23 13:06 style.css~
-rw-rw-r-- 1 mustafa mustafa 689 Feb 23 18:07 style_I.css
-rw-rw-r-- 1 mustafa mustafa 691 Feb 23 17:58 style_I.css~
我搬到圖像其他目錄,發現我不能訪問的public_html任何圖像和兒童目錄
您的圖像與其他可以訪問的文件相同嗎?例如你在'/ images /'中的圖像,而你的css,js等在'/ assets /'中? – sjdaws 2013-02-24 05:27:51
圖像在'〜/ public_html/assets/images /中''css文件位於'〜/ public_html/assets/style /'中,並且...我也將圖像文件夾中的圖像移動到了'css'文件夾中, t工作,我再次得到403錯誤。但我可以成功加載css文件js文件php html文件 – 2013-02-24 05:32:12
你可以編輯你的答案並粘貼'ls -l〜/ public_html/assets/images /'或'ls -l〜/ public_html/assets/images /樣式'包括至少一個圖像和一個CSS文件? – sjdaws 2013-02-24 05:33:56