如何使用"";Whois类代码"";脚本


How to use ""Whois Class Code"" script?

<?php
require("whoisClass.php")
$whois=new Whois;
$rs=$whois->whoislookup("99webtools.com"); //Your domain or IP
echo '<pre>'.$rs.'</pre>';
?>

这是显示whoisclass.php 的链接

http://99webtools.com/php-whois-script.php

脚本有一个错误,您也有(从源代码复制和粘贴(,是末尾缺少的分号

require("whoisClass.php")
                         ^ // <= right there

替换为:

require("whoisClass.php");

它就会运行。

打开错误报告,会发出以下错误信号:

分析错误:语法错误,第3行上/user/home/wois.php中出现意外的"$whois"(T_VARIABLE(

始终使用错误报告:

error_reporting(E_ALL);
ini_set('display_errors', 1);
  • http://php.net/manual/en/function.error-reporting.php

脚注:

当在某个行号上报告错误时,错误多次出现在该行号之前的行上。在这种情况下,它表示在3号线上,但实际上它在2号线上。