调用代码:<script src="/e/shopsys/buycar/buycarjs.php"></script>
新建个buycarjs.php放在/e/shopsys/buycar/下,代码如下
<?php require("../../class/connect.php"); if(!defined('InEmpireCMS')) { exit(); } $buycar=getcvar('mybuycar'); $record="!"; $r=explode($record,$buycar); $count=count($r)-1; ?> document.write("(<?=$count?>)");
效果见图
上传以下图片:
|