Resource

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • java.inet@gmail.com

    Resource

    HI


    what is the application of resource variable

  • gosha bine

    #2
    Re: Resource

    On 21.05.2007 08:36 java.inet@gmail .com wrote:
    HI
    >
    >
    what is the application of resource variable
    >
    Resource variable is where php extensions store their data. You usually
    obtain a resource from some 'init' type function and then simply pass it
    around. You cannot read or inspect the content of such variable.

    Pseudocode example:

    $resource = extension_init_ func();
    extension_do_so mething($resour ce);
    extension_do_so mething_else($r esource);
    etc
    extension_deini t_func($resourc e);


    Real world example:

    $cc = curl_init();
    curl_setopt($cc , CURLOPT_URL, "blah");
    curl_exec($cc);
    curl_close($cc) ;



    --
    gosha bine

    extended php parser ~ http://code.google.com/p/pihipi
    blok ~ http://www.tagarga.com/blok

    Comment

    Working...