【发布时间】:2011-12-30 11:23:10
【问题描述】:
我正在使用
$html = file_get_html($url);
preg_match("/<title>([^>]*)<\/title>/si", $html, $matches);
$title = $matches[1];
从给定 HTML 中获取标题的正则表达式。它在本地主机上运行良好。但是当它进入服务器时,它会显示Internal Server Error。
如果有人对此有所了解,请帮助我。
【问题讨论】:
-
它可能与您的正则表达式无关,而是与 url 路径有关。你能调试看看 $url 看起来是否正常
-
它适用于所有 url,但 youthchairstore.com/product_detail_9735_8924.aspx 的内部服务器错误