這是一個快速而簡單的問題。我有一個糟糕的一天,不知道如何做到這一點:如何在回聲呼叫中運行功能
我需要做的是...
我在url檢查PMD如果是這樣迴應的:
<?php
if (isset($_GET['pmd'])) {
echo"<div class=\"response\"><p style=\"width:350px; height:200px; vertical-align:middle;\"><strong>Thank you for acting as a "watchman on the walls" of Jerusalem! Your name will now appear on our virtual wall.<br><br>You can also catch up on the latest news from Israel by visiting our news feed below.</strong></p></div>";
}else { etc...
我需要包含的內容是像這樣的圖像觸發跟蹤像素。
<img src="url.com?cid=12345&aid=1234&oid=<?php echo mt_rand(); ?>&quantity=1" height="1" width="1" />
我想擁有的是:
<?php
if (isset($_GET['pmd'])) {
echo"<div class=\"response\"><p style=\"width:350px; height:200px; vertical-align:middle;\"><strong>Thank you for acting as a "watchman on the walls" of Jerusalem! Your name will now appear on our virtual wall.<br><br>You can also catch up on the latest news from Israel by visiting our news feed below.</strong></p>
<br />
<img src="url.com?cid=12345&aid=1234&oid=<?php echo mt_rand(); ?>&quantity=1" height="1" width="1" />
</div>";
}else {
什麼我需要做的就是這mt_rand()函數來火?
感謝,
馬特
您應該使用''&的網址,而不是'&'。 – Artefacto 2010-08-04 14:25:49
如果你不想逃避字符串中的引號(使其更難讀),只需在'''而不是'''中加入字符串。 – 2010-08-04 14:54:46