Reply to Re: Cannot understand this libcurl script, any help?

Your name:

Reply:


Posted by Jerry Stuckle on 07/01/07 16:14

Iván Sánchez Ortega wrote:
> Ming wrote:
>
>> do {
>> curl_multi_exec($mh,$running);
>> } while ($running > 0);
> [...]
>> What does $running mean? $running is NULL at first,
>
> No. It's undeclared at first.
>
>> how it becomes a value which is greater than zero?
>
> http://www.php.net/manual/en/function.curl-multi-exec.php
>
> "A reference to a flag to tell whether the operations are still running."
>
> Now, re-read your programming books, looking for anything
> on "pass-by-reference parameters". That should clear your mind.
>

No, $running is null. When you edited the post, you dropped:

$running=null;

As for how it changes - $running is passed by reference. This means if
curl_multi_exec changes the value of $running, the real value of
$running (not a copy) will change, and you will be able to test it in
your do...while loop.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация