it's my test codes:
$listnote = $noteStore->listNotebooks($_SESSION['accessToken']);
$notebookone = $listnote;
$notebookguid = $notebookone->guid;
$filter = new NoteFilter();
$filter->notebookGuid = $notebookguid;
$offset = 0;
for($i = 0; $i < 101; $i++){
$notesList = $noteStore->findNotes($_SESSION['accessToken'], $filter, $offset, 1000);
$remain = ($notesList->totalNotes) - (($notesList->startIndex) + (count($notesList->notes)));
echo 'test' . '<br>';
}
it can not print one hundred with test.
it just stuck in about 20 to 25. and then interrupt the following datas
I mean can not print other datas after these codes. like if findNotes() produce some remainings, it will use "exit()" to break off all of data after this.
even I change my code to:
$listnote = $noteStore->listNotebooks($_SESSION['accessToken']);
$notebookone = $listnote;
$notebookguid = $notebookone->guid;
$filter = new NoteFilter();
$filter->notebookGuid = $notebookguid;
$offset = 0;
do{
for($i = 0; $i < 101; $i++){
$notesList = $noteStore->findNotes($_SESSION['accessToken'], $filter, $offset, 1000);
$remain = ($notesList->totalNotes) - (($notesList->startIndex) + (count($notesList->notes)));
echo 'test' . '<br>';
}
while($remain > 0);
it still have the same situation.
because of my code, $remain? Is it wrong? I test it before. its value is 0 all the time.
Does anybody know have the same situation like me?













