특정 항목에 첨부 된 모든 파일을 다운로드하려고하지만 반환 된 항목 개체에서 file_ids 부분 배열에 액세스하는 데 문제가 있습니다. item_id와 같이 거의 모든 다른 부분에 액세스 할 수 있지만 file_ids에서 아무 것도 가져 오지 않으면 아무 것도 반환하지 않습니다. 어떤 도움을 크게 감상 할 수PodioItem :: get에서 file_ids 부분 배열 가져 오기
> Array (
> [item_id] => #########
> [external_id] => share_#########
>
> .
> .
> .
>
> [file_ids] => Array
> (
> [0] => #########
> [1] => #########
> [2] => #########
> [3] => #########
> [4] => #########
> [5] => #########
> [6] => #########
> [7] => #########
> [8] => #########
> [9] => #########
> [10] => #########
> )
>
>)
>item_id is: #########
>file_ids count: 0
>file_ids[0] is:
:
$item = PodioItem::get(#########);
//this works
print $item;
//this works
print "item_id is: ".$item->item_id."\n";
//this returns 0, should return 20
print "file_ids count: ".count($item->file_ids)."\n";
//this returns nothing, should return a file_id
print "file_ids[0] is: ".$item->file_ids[0]."\n";
여기에 출력합니다. 나는 왜 내가 file_ids가 아닌 모든 것을 얻을 수 있는지에 관해서 두뇌와 인터넷을 고수했다.
'var_dump ($ item-> file_ids [0])'에 의해 반환 될 내용은 무엇입니까? – camelsWriteInCamelCase
NULL이 반환됩니다. –