这是一个快速而简单的问题.我有一个糟糕的一天,不知道如何做到这一点:
我需要做的是……
我正在检查网址中的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()函数触发,我需要做什么?
谢谢,
马特
您可以使用此语法:
原文链接:https://www.f2er.com/php/133760.html<?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; ?>