2011-09-16 105 views
1

我的WAMP服務器工作正常,我有drupal和另一個個人php項目運行在它的www目錄中。一切都很好。本地主機不在WAMP中打開

但最近,我試圖配置SVN服務器與Apache,然後當我嘗試http://localhost 下面的代碼被下載,而不是顯示WAMP主頁。

<?php 

/** 
* @file 
* The PHP page that serves all page requests on a Drupal installation. 
* 
* The routines here dispatch control to the appropriate handler, which then 
* prints the appropriate page. 
* 
* All Drupal code is released under the GNU General Public License. 
* See COPYRIGHT.txt and LICENSE.txt. 
*/ 

/** 
* Root directory of Drupal installation. 
*/ 
define('DRUPAL_ROOT', getcwd()); 

require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; 
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); 
menu_execute_active_handler(); 

還試圖打開一個靜態頁面和它的工作。 http://localhost/index.html

+0

我相信我的drupal出了問題。我可以打開其他PHP項目。但不是http:// localhost或http:// localhost/drupal – John

回答

1

您需要確保apache配置正確的handlermodule來解釋php而不是服務它。

文件IIRC是httpd.conf的機會是很高的模塊和處理程序實際上列出,但註釋掉

+0

php代碼正在運行,請參閱上面的註釋。 – John