Jump to content

yassen

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

yassen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. To say the obvious, you do not close the local file you are writing to. Try adding [code]fclose($handle);[/code] somewhere after the ftp session has ended and try again.
  2. Thanks, RockingGroudon! I finally got it -- it was my mistake, erroneous code in a wrapper function that substituted the return value for something else. Thanks again!
  3. My worst fears are justified: Not only newbies fail to understand how references work in PHP, nobody really knows  :-\
  4. I use CodeIgniter, really not bad. [url=http://www.codeigniter.com/]http://www.codeigniter.com/[/url]
  5. Hello guys, first post here. I am really desparate about how references (do not) work in PHP. Here's a code snippet: [code] var $data; var $_children; var $_uniqueNames; function &add(&$child) { $name = $child->data->name; if (array_key_exists($name, $this->_uniqueNames)) { return $this->_uniqueNames[$name]; } $this->_children[] =& $child; $this->_uniqueNames[$name] =& $child; // we register the name $true = TRUE; return $true; } [/code] This is part of a simple Node class prepared to build trees. A Node remembers the names of its children and refuses to add a new child with a name already registered. Everything seems to work except the return value in case there is an attempt to add a child with an already registered name -- my client code always gets NULL whatever I do! I would appreciate any idea of why is that and how can I fix it, thanks in advance! Yassen
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.