누구나 "Class 'Whois'not found"오류가 발생하는 이유를 알려주십시오. 그것은 라인 $whois = new Whois();
과 관련이 있습니다. 그러나 나는 무엇이 확실하지 않습니다.문제 해결 "클래스를 찾을 수 없음"오류
<form method="post" action="">
<div style="margin:auto;width:300px;">
<label for="domain name">Domain Check:</label><br />
<input type="text" name="domain" /><br /><br />
<input type="submit" />
</form>
<br />
<?php
if (isset($_REQUEST['domain'])) { // check to see if form has been submitted
function getwhois($domain, $tld)
{
require_once("whois.class.php");
$whois = new Whois();
if(!$whois->ValidDomain($domain.'.'.$tld)){
return 'Sorry, the domain is not valid or not supported.';
}
if($whois->Lookup($domain.'.'.$tld)){
return $whois->GetData(1);
}else{
return 'Sorry, an error occurred.';
}
}
$domain = trim($_REQUEST['domain']);
$dot = strpos($domain, '.');
$sld = substr($domain, 0, $dot);
$tld = substr($domain, $dot+1);
$whois = getwhois($sld, $tld);
echo "
";
echo $whois;
echo "
";
}
?>
</div>
whois.class.php의 새로운 기능에서이를로드하고 있는지 확인? –
var_dump (file_exists ("whois.class.php")); –
인터넷에서 사용하려고하는 Whois 클래스를 발견했습니다. : P 그리고 그것은 다음을 포함해야합니다 : http://www.nott.org/uploads/whois.class.php.txt 실제로 그 것을 포함하고 있습니까, 아니면 비어 있습니까? ... –