dtxb75622 2019-07-28 15:13
浏览 48

我的PDO适用于我的本地主机但不适用于我的主机[重复]

I am using a $_SERVER['REQUEST_URI'] to get a token which I then check in the database to get a link I have the same database table for both. Of course I changed the config.php But the problem is that Half of the script does not even appear

I tried debugging by echo hi1 and hi2 hi1 appears but hi2 does not appear

$tokenplus = $_SERVER['REQUEST_URI'];

$tokenit = substr("$tokenplus",1);


include 'config.php';
echo "hi1";

//hi 1 should appear

$stmt = $con -> prepare ("SELECT 
  * 
       FROM 
  links 
       WHERE 
  alias =?
  LIMIT 1");

  $stmt-> execute ( array($tokenit));
  $row =$stmt -> fetch();
  $count = $stmt-> rowCount();
  echo "hi2";

//Hi 2 should appear


  if ($stmt-> rowCount() > 0) {
  $linkit = $row['url'];

?>

<center>







        <script>

               function enableBtn(){
                   document.getElementById("button1").disabled = false;
                  }
               </script>
               <div class="g-recaptcha" data-sitekey="6LeX3a8UAAAAABnC7xJ9Qv7jxcRayrEcwjm4tnah" data-callback="enableBtn"></div>
               <form action = "<?php echo 'http://www.'.$linkit;?>" >              
               <input class="btn btn-outline-primary btn-captcha m-4 disabled" type="submit" value="Click here to continue" id="button1" disabled="true">

            </form>


</center>




<?php 
}else{
 ?><center> <?php echo  'The link was not found' ;?></center>
 <?php
}
?>
</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python:excel数据写入多个对应word文档
    • ¥60 全一数分解素因子和素数循环节位数
    • ¥15 ffmpeg如何安装到虚拟环境
    • ¥188 寻找能做王者评分提取的
    • ¥15 matlab用simulink求解一个二阶微分方程,要求截图
    • ¥30 乘子法解约束最优化问题的matlab代码文件,最好有matlab代码文件
    • ¥15 写论文,需要数据支撑
    • ¥15 identifier of an instance of 类 was altered from xx to xx错误
    • ¥100 反编译微信小游戏求指导
    • ¥15 docker模式webrtc-streamer 无法播放公网rtsp