dsrjs86444 2016-06-27 02:41
浏览 6
已采纳

PHP中的语法或变量错误

Is there any problem with this PHP code? It displays nothing. Please help.

<?php
date_default_timezone_set('Asia/Kuala_Lumpur');
$date_time = date('Y-m-d H:i:s');
$host = $_SERVER['HTTP_HOST'];
$device = Detect::deviceType();
$device_brand = Detect::brand();
$operating_system = Detect::os();
$browser_name = Detect::browser();
$service_host = Detect::ipHostname();
$service_org = Detect::ipOrg();
$ip_country = Detect::ipCountry();
echo $host;
echo $date_time;
echo "IP: ". $ip_country;
?>
  • 写回答

1条回答 默认 最新

  • dpk20361 2016-06-27 02:56
    关注

    1) Your script is calling Detect class, but I don't see from where it comes. Are you including a file containing its declaration?

    2) Is Detect class "mute", ie, works without verbose response?

    3) If you are not getting any errors, try to add to your script first lines

    error_reporting(2047); ini_set("display_errors",1);

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 unity第一人称射击小游戏,有demo,在原脚本的基础上进行修改以达到要求
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line