[英]Xampp version 1.7.7 php code doesn 't work
我已經為Windows安裝了Xampp版本1.7.7,我想開始學習php。 這里的問題是我無法運行php代碼。
我嘗試了這個非常簡單的例子
<html>
<head>
<title>Hello world!</title>
</head>
<body>
<?php echo "Hello world!"; ?>
</body>
</html>
Ofcorse我不會雙擊php文件,而不僅僅是在Firefox中執行它。 我去
http://localhost/xampp/htdocs/helloworld.php
這是最接近的方向,我已經檢查了好幾次了。 我也嘗試過index.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
05/21/12 15:17:22
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4
Perl/v5.10.1
我已經用默認選項安裝了Xampp,當我單擊admin(xampp xontrol面板)時,我得到了經典的橙色頁面。 當我進入狀態菜單時,它顯示除SMTP服務和Tomcat服務以外的所有內容均已激活。 我嘗試卸載並重新安裝xampp,但沒有任何更改。
我也在網上搜索,但似乎無濟於事。 謝謝
嘗試
http://localhost/helloworld.php
如果將文件保存在xampp / htdocs /
嘗試http:// localhost / helloworld.php C:... \\ xampp \\ htdocs \\是您的文檔根目錄,因此服務器從此文件夾中獲取文件,並且Firefox可以通過http:// localhost / file訪問它們.php文件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.