
我是一個 Linux 新手。我已經在 Ubuntu 13.10 上安裝了 xampp 1.8.3-2(lampp)
並進行了配置。
我將我的www
資料夾貼到 Ubuntu 13.10 中的/opt/lampp/htdocs
.
現在資料夾的擁有者www
是root
,具有建立和刪除檔案的權限,我更改了權限:
sudo chmod 777 -R /opt/lampp/htdocs/www
我可以訪問目錄中的舊文件www
,並在瀏覽器中查看網頁,URL 為localhost/xampp/www/xxx/abc.php
.我可以創建像aaa.php
inside這樣的文件www
,但是當我嘗試查看aaa.php
文件時,它說
Object not found
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.`
If you think this is a server error, please contact the webmaster.`
Error 404
localhost Apache/2.4.7 (Unix) OpenSSL/1.0.1e PHP/5.5.6 mod_perl/2.0.8-dev Perl/v5.16.3
無法執行新文件,也無法執行修改後的程式碼。有什麼建議麼?謝謝。
答案1
我使用的路徑是錯誤的。 我使用的是/opt/lampp/htdocs/www/a.php
而不是它應該是/opt/lampp/htdocs/xampp/www/a.php
這就是為什麼它無法找到。因為我有響應的 url,http://localhost/xampp/www
所以我只需將目錄和文件放入其中/opt/lampp/htdocs/xampp/www
即可正常工作。