$tid=intval($settings["tid"]);        .............省略<script src="xxx.php"></script>  <<<这个代码显示的是一个数字tid 也是一个数字但我直接把<script src="xxx.php"></script>放上去不行了....怎办...$tid=intval(<script src="xxx.php"></script>);  <<<这样不行
$tid=<script src="xxx.php"></script>;          <<<这样也不行我想要的是把$tid = <script src="xxx.php"></script>怎么办???分数全送了...救我啊........谢谢

解决方案 »

  1.   


    <script src="xxx.php"></script> <<<这个代码显示的是一个数字to
    <script type="text/javascript" src="xxx.php"></script>

    <script language="javascript" src="xxx.php.php"></script>
      

  2.   

    $tid=intval(<script src="xxx.php"></script>); <<<这样不行   //intval 字符串转整?
    $tid=<script src="xxx.php"></script>; <<<这样也不行     //字符串赋值 少引号字符串赋值 两边应该加引号$tid='<script src="xxx.php"></script>'; 
      

  3.   

    加了 ''都不行...我说的是discuz论坛<script type="text/javascript" src="http://xxx/api/javascript.php?key=%E4%B8%BB%E9%A1%8C%E5%88%97%E8%A1%A8_CgO"></script>以上是一条 数据调用 代码 (随机主题的id数字)<a href="viewthread.php?tid=$tid">123</a>我想把$tid 换成 <script type="text/javascript" src="http://xxx/api/javascript.php?key=%E4%B8%BB%E9%A1%8C%E5%88%97%E8%A1%A8_CgO"></script>变成以下这样是不行的...<a href="viewthread.php?tid=<script type="text/javascript" src="http://xxx/api/javascript.php?key=%E4%B8%BB%E9%A1%8C%E5%88%97%E8%A1%A8_CgO"></script>">123</a>那请问怎办...??很复杂啊这个对我来说...求救
      

  4.   

    <?php
    if($requestrun) {
    $tid=intval($settings["tid"]);
    $vote=$db->fetch_first("SELECT * FROM {$tablepre}polls WHERE tid='$tid'");
    $writedata=$writedata.'<div style="padding-bottom:8px;" id="votetitle" align="center"><a style="color:#00B2E8;font-
    size:16px;font-weight:700;" href="viewthread.php?tid='.$tid.'" target=_blank>'.$subject.'</a></div>';
    $writedata=$writedata.'</div>';
    } else {
    $request_settings = array(
    'tid'  => array('tid', 'what is tid?', 'text'),
    );
    }
    ?>php原文tid是要自己输入的固定数字
    但我想做成随机数字
    那当然只好用<script type="text/javascript" src="http://xxx/api/javascript.php?key=%E4%B8%BB%E9%A1%8C%E5%88%97%E8%A1%A8_CgO"></script>但<script type="text/javascript" src="http://xxx/api/javascript.php?key=%E4%B8%BB%E9%A1%8C%E5%88%97%E8%A1%A8_CgO"></script>
    这句代码我不知道怎样加入...
      

  5.   

    Do you want modify something that is application about discuz, 
    please show more detail to let them help you ..
      

  6.   

    我还真不知道这样行不行,不过LZ你的写法是个PHPER都会吐血的。<?php
    ob_start();
    ?>
    <script src="xxx.php"></script>
    <?php
    $tid= intval(ob_get_clean());
    ?>
      

  7.   

    试了一下上面的代码。
    不使用intval,echo $tid可以输出数字。
    把<script src="xxx.php"></script>换成1111,echo $tid也可以输出数字
    奇了怪了