Re: Beaten!

From: Date: Wed, 16 Apr 2003 17:41:05 +0000
Subject: Re: Beaten!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-144152@lists.php.net to get a copy of this message
And I would love to send the entire class (as was suggested earlier), but alas... Hi. This is the qmail-send program at pb1.pair.com. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <php-general@lists.php.net>: ezmlm-reject: fatal: Sorry, I don't accept messages larger than 40000 bytes (#5.2.3) I guess a 63KB PHP Class file isn't the prettiest thing... -- me ----- Original Message ----- From: "Chris Knipe" <savage@savage.za.org> To: "Jonathan Pitcher" <jpitcher@cfedc.com> Cc: <php-general@lists.php.net> Sent: Wednesday, April 16, 2003 7:28 PM Subject: Re: [PHP] Beaten! > Yeah... Ditto. > > I literally spent over 5 hours "staring" at this couple of lines, and I > honestly can't see anything wrong - I even re-rewrote it a couple of > times... But this now leads to something else (I will mail the entire class > just now - be ware though, it's huge!) > > When coding classes, doesn't PHP "interpret" each function separately? > i.e., if one function has a error, PHP will give the parse error inside that > one function, sort of like... > > function blah() { > .... allot of code ... > } > > echo "this is a parse error" > > > What PHP is doing now in my case (pardon if I am wrong), it is telling me > that I have a parse error with the echo (no semi colon), but it is stating > the parse error being somewhere inside blah()... That, doesn't make allot of > sense to me... > > > > -- > me > > ----- Original Message ----- > From: "Jonathan Pitcher" <jpitcher@cfedc.com> > To: "Chris Knipe" <savage@savage.za.org> > Cc: <php-general@lists.php.net> > Sent: Wednesday, April 16, 2003 5:24 PM > Subject: Re: [PHP] Beaten! > > > > Chris, I can't find an error with your code. > > > > Here is what I did. > > > > I copied your partial function and then closed all the open {'s and it > > can with out a parse error. > > > > See what I mean > > > > Function AddMXRecord($mx,$pref,$ttl) > > { > > global $db; > > $result = ''; > > $i = 0; > > while(list($key,$value) = each($mx)) > > { > > if($value != "") > > { > > if(!(checkDomain($value) || checkName($value))) > > { > > $result .= '<font color="red">Error: bad MX name ' . > > stripslashes($value) . '</font><br>\n'; > > $this->error = "Data error"; > > } > > else > > { > > > > } > > > > } > > } > > } > > > > That ran without a parse error. > > > > I would check your brackets or copy the entire function into an email. > > > > Jonathan > > > > On Wednesday, April 16, 2003, at 09:30 AM, Chris Knipe wrote: > > > > > Lo all, > > > > > > The code has one again beaten me... Below follows a function inside a > > > class... > > > > > > Function AddMXRecord($mx,$pref,$ttl) { > > > global $db; > > > $result = ''; > > > $i = 0; > > > while(list($key,$value) = each($mx)) { > > > if($value != "") { > > > if(!(checkDomain($value) || checkName($value))) { > > > $result .= ' > > > <font color="red">Error: bad MX name ' > > > . > > > stripslashes($value) . '</font><br>\n'; > > > $this->error = "Data error"; > > > } else { > > > > > > Line 134 = $result .= ' .... > > > > > > I get a parse error on line 134 :( > > > > > > > > > -- > > > me > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#144152) next »