AW: [PEAR-DEV] Proposal: HTTP_Download (another tiny package :)

From: Date: Fri, 26 Sep 2003 08:43:53 +0000
Subject: AW: [PEAR-DEV] Proposal: HTTP_Download (another tiny package :)
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22065@lists.php.net to get a copy of this message
Hi > 1) Range Isn't this implemented already? /** * Handle partial downloads */ $partial_length = null; if (preg_match('/^bytes:(\d*)-(\d*)$/i', $_SERVER['Range'], $bytes)) { $start = $bytes[1] ? $bytes[1] : 0; $end = $bytes[2] ? $bytes[2] : filesize($this->_file); $partial_length = $end - $start; if ($partial_length < 1) { $partial_length = null; } } But I think I found a bug in setParams: if (!method_exists($this, $param)) { return PEAR::raiseError("Param '$param' doesn't exist."); } $e = $this->{'set' . $param}($value); You are looking for a method and calling a different method... Stephan

« previous php.pear.dev (#22065) next »