【问题标题】:Illegal string offset 'handler' in PHP [duplicate]PHP中的非法字符串偏移“处理程序”[重复]
【发布时间】:2013-07-31 12:59:45
【问题描述】:

请问我该如何纠正这个错误:

Warning: Illegal string offset 'handler' in /home/***************/public_html/whois/phpwhois/whois.gtld.php on line 95

关于以下代码:

function parse($data, $query)
{
$this->Query = array();
$this->SUBVERSION = sprintf("%s-%s", $query["handler"], $this->HANDLER_VERSION);
$this->result = generic_parser_b($data["rawdata"], $this->REG_FIELDS, 'dmy');

【问题讨论】:

标签: string offset


【解决方案1】:

请检查 $query 是否为字符串,如果是,则代码将不起作用。确保将 $enquiry 作为数组传递或触发异常。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-05
    • 2013-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-27
    • 1970-01-01
    相关资源
    最近更新 更多