나는 folowing 코드로 사이트를 구문 분석하려고합니다. 나는 결과를 인쇄하기 위해 노력하고있어 때PHP 간단한 HTML 돔 파서. 빈 스팬
<span id="ctl00_cphBody_resList_pnlResumes_rptResumes_ctl01_Label1" class="address">Somename, <nobr>Someage</nobr></span>
것은 내가
echo $fio->innertext;
이 결과가 비어있는, 이런 식
$fio=$text_specialty_next->find('span#ctl00_cphBody_resList_pnlResumes_rptResumes_ct'.$n.'_Label1');
를 분석하지만거야. 이 문제의 원인은 무엇입니까?
이제 내 sollution이 이와 같습니다. ($ N <10) \t \t \t \t \t \t \t \t { 경우 \t \t \t \t \t $ nstr = "0"$ N.; \t \t \t \t \t \t \t $ FIO = $ text_specialty_next-> 찾기 ('범위 [ID = ctl00_cphBody_resList_pnlResumes_rptResumes_ctl를'$ nstr .'_을 Label1.]); 다른 \t \t \t \t \t \t \t \t \t \t \t \t} \t \t \t \t \t \t \t \t \t \t \t \t { \t \t \t \t \t \t \t $ fio = $ text_specialty_next-> find ('span [id = ctl00_cphBody_resList_pnlResumes_rptResumes_ctl'. $ n .'L Label1] '); \t \t \t \t \t \t} 여기서 $ n = 01이며 증가합니다. –
실수를 고쳤으며 span # 값을 span으로 변경했으나 여전히 작동하지 않습니다. = (지금은 무엇을 할 수 있습니까?) –