这是一个快速但简单的问题。我今天过得很糟糕,不知道该怎么做:
我需要做的是这个...
我正在检查 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() 函数?
Thanks,
Matt
您可以改用以下语法:
<?php if ( isset($_GET['pmd']) ): ?>
<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>
<?php else: ?>
etc
<?php endif; ?>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)