[英]php embedded in html5 not working in aptana
我正在使用aptana創建一個移動網絡應用。 它在html5中,我試圖在其中嵌入一些PHP,以便進行一些服務器調用。 首先,我只是想在html5中創建一個簡單的echo語句。 此嵌入式echo語句有什么問題,因此無法正常工作?
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page" class="type-home">
<div data-role="header">
<h1>JQM : Customize ListView</h1>
</div>
<div data-role="content">
<?php echo 'While this is going to be parsed.'; ?>
<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="a">
<li data-role="list-divider">Overview</li>
<li><a href="#"> <h1>Country Name : Thailand </h1></a></li>
<li><a href="#"> <h1>Country Name : China </h1></a></li>
<li><a href="#"> <h1>Country Name : Malaysia </h1></a></li>
<li><a href="#"> <h1>Country Name : India </h1></a></li>
<li><a href="#"> <h1>Country Name : Indonesia </h1></a></li>
</ul>
</div>
</div>
</body>
</html>
php語句在服務器端工作。 因此,如果您的服務器具有php並正在運行它,則可以對其進行處理。
要使文件由php處理,在從服務器輸出文件的過程中,文件擴展名為
afile.php
不
afile.html
因此服務器將調用php,而php將運行與其相關的命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.