2013-05-30 28 views
0

喜上不執行PHP代碼,我彙報了我的腳本(https://github.com/joshf/Indication/issues/6)約回聲報表打印,而不是excecuting其他用戶的服務器

<!DOCTYPE html> 
<html lang="en"> 
<head> 
<meta charset="utf-8"> 
<title>Indication</title> 
<meta name="robots" content="noindex, nofollow"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link href="resources/bootstrap/css/bootstrap.css" type="text/css" rel="stylesheet"> 
<style type="text/css"> 
body { 
    padding-top: 60px; 
} 
</style> 
<link href="resources/bootstrap/css/bootstrap-responsive.css" type="text/css" rel="stylesheet"> 
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> 
<!--[if lt IE 9]> 
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> 
<![endif]--> 
</head> 
<body> 
<!-- Nav start --> 
<div class="navbar navbar-fixed-top"> 
<div class="navbar-inner"> 
<div class="container"> 
<a class="brand" href="#">Indication</a> 
</div> 
</div> 
</div> 
<!-- Nav end --> 
<!-- Content start --> 
<div class="container"> 
<div class="page-header"> 
<h1><? echo WEBSITE; ?></h1> 
</div>  
<div class="alert alert-error"><h4 class="alert-heading">Error</h4><p>ID cannot be blank.</p><p><a class="btn btn-danger" href="javascript:history.go(-1)">Go Back</a></p></div></div></body></html> 

通知回聲網站的問題

的PHP代碼是

die("<div class=\"alert alert-error\"><h4 class=\"alert-heading\">Error</h4><p>ID does not exist.</p><p><a class=\"btn btn-danger\" href=\"javascript:history.go(-1)\">Go Back</a></p></div></div></body></html>"); 

! 這是一個代碼問題或配置問題,我無法重現它

+2

PHP沒有解析用戶的網站的文件。他們需要在apache上啓用php。 – Orangepill

+0

嗯我給了他們一些PHP調試的東西,並執行罰款 –

+0

也許他們的配置將解析''而不是'' - 見http://stackoverflow.com/questions/200640/are-php-short-tags-可接受使用的 – Blazemonger

回答

2

這可能是因爲你使用php的短標籤<?..?>。請避免使用它們,並切換到長一個<?php....?>

1

可能您已關閉服務器中的短標籤。

這是不使用

<? /* something */ ?> 
<?=echo $something;?> 

一個好主意,因爲有些服務器在短標籤被禁用。

嘗試:

<?php echo WEBSITE; ?>