阻斷代碼,我有下面的代碼,它在我的本地XAMPP和測試的Linux虛擬主機偉大的工作:標籤/縮進的Windows Server
<?php
// include config file
include('config.php');
// get page intel
$_PAGE = switchPage($_GET);
// require language file
require_once("languages/".$_PAGE['language'].".lang.php");
// include header file
include('includes/header.inc.php');
?>
<section id="main" class="clearfix">
<?php
// include correct page
include($_PAGE['include_path']);
?>
</section>
<?php
// include footer file
include('includes/footer.inc.php');
?>
我的客戶擁有PHP 5.2.6安裝在Windows服務器。託管公司聲稱,在下面snipet中使用的標籤/縮進不適用於windows php託管。
<?php
// include correct page
include($_PAGE['include_path']);
?>
所以他們聲稱我的代碼是無效的PHP代碼..有人可以請教嗎?我不想重寫我的代碼只是因爲我使用的所有縮進來保持我的代碼清潔和可讀。
您的代碼是有效的PHP。定義'不起作用'。 – Maerlyn 2011-04-12 16:03:29
這完全是無稽之談。與大多數現代語言一樣,PHP對於空白和佈局幾乎沒有規定。 – 2011-04-12 16:12:20