我有一個Drupal安裝在www.example.com/test
。現在,它已準備好上線了,我正試圖將其移至www.example.com
。我改了行中sites/default/settings.php
到:PHP解析錯誤; Drupal6部署
$base_url = 'http://www.example.com/'; // NO trailing slash!
當我瀏覽到我的index.php,我得到的各種分析錯誤的,就像這樣:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
in /home/example/public_html/sites/all/modules/typogrify/typogrify.class.php
on line 18
問題是這樣的:
public static function amp($text) {
$amp_finder = "/(\s| )(&|&|&\#38;|&)(\s| )/";
return preg_replace($amp_finder, '\\1<span class="amp">&</span>\\3', $text);
}
像這樣的每個函數都會導致錯誤。那麼PHP不再理解這個在子目錄中工作完美的語法了嗎?
你使用什麼PHP版本? – Gumbo 2009-11-15 20:35:51
PHP版本4.4.9 – 2009-11-15 21:02:57
那麼,那就是你的問題。 – troelskn 2009-11-15 22:30:14