2014-04-16 85 views
0

調用index.php頁面,我使用curl從http://my_example_domain.comPHP - 捲曲默認情況下不

現在只是好奇獲取數據 - 爲什麼我沒有在默認情況下得到的index.php頁面的數據。

我的命令行是 -

curl 'http://my_example_domain.com' 

注 - 我得到的數據,如果我把在年底削減 -

curl 'http://my_example_domain.com/'  
+3

這可能是由於這樣的web服務器被配置 – AeroX

回答

2

Web服務器未配置爲顯示的index.php爲默認索引文件。在Apache中,這是通過增加配置:

DirectoryIndex index.php 

爲了您的虛擬主機或目錄config條目:

<Directory /var/www/> 
    DirectoryIndex index.php 
    ... 
</Directory> 
+0

我怎能忘記!謝謝 - 這工作:) –