-1
<div class="divHeaderContainer1">
<table width="488" cellspacing="0" cellpadding="0" height="63">
<tbody>
<tr>
<td height="61">
<a href="jobs/jobdetails.php?recordID=5300"> Job Vacancy For Media and Production Officer At The International Committee of the Red Cross (ICRC) </a>
<div class="jobDate">posted on 2013-05-10 | by Admin | 0 comments | 379 views </div>
</td>
</tr>
</tbody>
</table>
</div>
아래의 코드로 웹 사이트 (www.employmentng.com)에서 href 속성을 검색하려고했으나 아무 것도 반환하지 않았습니다.단순한 html dom과 함께 내용을 검색하지 않습니다.
$url='http://www.employmentng.com/index.php?pageNum_Jobs=1&totalRows_Jobs=5127';
$html = file_get_html($url);
foreach($html->find('div[class=divHeaderContainer1]') as $container){
foreach($html->find('table td[height]') as $table){
foreach($table->find('a') as $link{
echo $link-href;
}
}
}
나는 당신이 구문 오류가이하시기 바랍니다
가능성은 당신은'$ container-> find ("table ...")' 대신에'$ html-> find ("table ...")'? – Passerby
나는 $ container-> find ('table ...)를 의미했다. –