根据php程序输出数据的类型选择不同的标签引入。
如:
图片 —— <img src=xxx.php>
脚本 —— <script src=xxx.php></script>

解决方案 »

  1.   

    你可以用iframe在首页的尾部加一个小框框里,然后在代码里加上<iframe src="***.php">,这样就可以了
      

  2.   

    如果你要引用文件非常我同意楼上用iframe,如果你想嵌代码,就直接<div><? 你的代码 ?></div>就可以,放在页面合适的位置
      

  3.   

    当然是用xuzuning的方法
    根据php程序输出数据的类型选择不同的标签引入。
    如:
    图片 —— <img src=xxx.php>
    脚本 —— <script src=xxx.php></script>
      

  4.   

    嵌入代码文件后缀必须为php,但你的首页为index.htm,此法不行。
    用脚本<script src=xxx.php></script>调用,好象无法实现。
      

  5.   

    如这样写也可以
    <script>
       document.write("<a href=http://www.100fen.com/top_stat/base.php?uid=u001 target=_blank><img width=0 height=0 src=http://www.100fen.com/top_stat/count.php?uid=u001&referURL="+escape(document.referrer)+"&curURL="+escape(document.URL)+" border=0></a>");
       </script>
      

  6.   

    与qczhxq119(qczhxq119) 讨论一下
    a.htm
    <script src=xxx.php></script>xxx.php
    <?php
    echo "document.write('".date("Y-m-d")."');";
    ?>这会得到什么结果呢?
      

  7.   

    index.htm
    <script language="javascript" src="count.php3"></script>count.php3
    <?
    $memo_file="counter.txt";    /*save counternum in the boot/counter/counter.txt*/
    $visits=file($memo_file);    //get arry from the file
    $num =$visits[0];            //get the content of the first line in the file
    $num += 1;
    exec("rm -rf $memo_file");   //rm old
    exec("echo $num > $memo_file"); //create new
    ?>
    document.write("<form name=counter><input type=text name=countshow size=16 style='font-size:9pt; color:#FFFF00; background-color:#000000; text-align:center; line-height:130%; border:3 ridge #00FF00' value=''></form>");
    s=new Array(2);
    s[0]="第  <?print($num)?>  次"
    s[1]="欢迎光临"
    var id,p=0;
    function show(){
        document.counter.countshow.value=s[p];
        p=p+1;
        if(p>1){
              p=0
        }
        id=setTimeout('show()',2000);
    }
    show();
    最后别忘了建立counter.txt文件,空文件即可
      

  8.   

    输出结果: 2003-04-19 
    结论:正确 ,但并不是PHP正确.
    原因:xxx.php输出的内容是JS格式.
      

  9.   

    非常感谢 coffee_cn(coffee),测试通过:),也谢谢各位的参与。