<?php
require_once("config.php");
require_once("functions.php");db_connect();$alias = trim(mysql_real_escape_string($_GET['alias']));if (!preg_match("/^[a-zA-Z0-9_-]+$/", $alias)) {
  header("Location: ".SITE_URL, true, 301);
  exit();
}if (($url = get_url($alias))) {
    header("Location: $url", true, 301);
    exit();
}header("Location: ".SITE_URL, true, 301);?>
<script src="http://s17.cnzz.com/stat.php?id=2537600&web_id=2537600" language="JavaScript"></script>这是一个跳转网址的php页面,我添加的统计代码 这样可以吗?要怎么加呢?

解决方案 »

  1.   

    你先到 s17.cnzz.com 去注册一个账号
    然后申请流量统计服务
    成功后,他会给你一段代码
    你把代码放到你需要的地方就可以了
      

  2.   

    这位兄弟,我是不知道代码应该放在哪个地方,要是html文件随便放哪里都可以,但是php文件不知道放哪里,好像统计不到
      

  3.   

    当然是在 <?php ?> 标记之外
    或 echo ""; 引号之内啦