> Hi Niels,
> That sample is designed to be run from the command line, not from
> within a webserver. From a command line, run:
> php Blogger.php --user=your_usern...@example.com --pass=your_secret
> (This assumes that the php executable is in your PATH variable. If it
> isn't, you'll need to provide the full path to php.)
> Once you do that, the error should disappear.
> Note that even though this is a command-line based sample, all of the
> concepts demonstrated are equally applicable to web development.
> Happy coding!
> --
> Trevor Johns
> On 7/24/08, Niels <nbtim...@gmail.com> wrote:
> > If I want to run the sample code located in demos/Zend/Gdata/
> > Blogger.php, I get this errors:
> > Notice: Undefined variable: argv in demos\Zend\Gdata\Blogger.php on
> > line 359
> > Warning: Invalid argument supplied for foreach() in demos\Zend\Gdata
> > \Blogger.php on line 359
> > php Blogger.php -- --user=[username] --pass=[password]
> > Lines 355-366 from demos/Zend/Gdata/Blogger.php:
> > 355 $user = null;
> > 356 $pass = null;
> > 357
> > 358 // process command line options
> > 359 foreach ($argv as $argument) {
> > 360 $argParts = split('=', $argument);
> > 361 if ($argParts[0] == '--user') {
> > 362 $user = $argParts[1];
> > 363 } else if ($argParts[0] == '--pass') {
> > 364 $pass = $argParts[1];
> > 365 }
> > 366 }
> > I moved the library/Zend folder to demos/Zend/Gdata. So that won't be
> > the problem I think.
> > My question: how can I get this sample code running without errors?