RE: [PHP] socket_read can not read the whole HTTP page?

2007-12-28 Thread ked
sed" : so that should be close not closed; Both modification are required. Shall anyone tell me sth. about "HTTP/1.0" and "HTTP/1.1" ? best regards! ked > -Original Message- > From: Eddie Dunckley [mailto:[EMAIL PROTECTED] > Sent: Friday, December 28,

[PHP] socket_read can not read the whole HTTP page?

2007-12-27 Thread ked
I wrote those script to get HTTP url content, and it works , but it can't read the whole content of the page. Blocked on "while ($out = socket_read($socket, 1024)) ". browser show the processbar all the time , and the page is not completed display, If I press ESC key to cancel the request , the

RE: [PHP] Try{} Catch()

2007-12-23 Thread ked
use it just like in JAVA, It offers a uniform/good way to manage exception in app. e.g. function getObjFromDB($key) { if (strlen($key)!=0 ) throw new Exception ("need condition ."); if (!mysql_connect(...)) throw new Exception ("can't connect to db ."); . } function foo () { $err=''; for (

RE: [PHP] about __get,__set Overloading, read-only properties

2007-12-23 Thread ked
s [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 23, 2007 9:08 AM > To: ked > Cc: php-general@lists.php.net > Subject: Re: [PHP] about __get,__set Overloading, read-only properties > > ked schreef: > > My idea is just your answer...happy..ing ^_^ > > > > You are

RE: [PHP] about __get,__set Overloading, read-only properties

2007-12-20 Thread ked
My idea is just your answer...happy..ing ^_^ You are so warmhearted. Thanks a lot! : ) I will never post a question to a existing thread . > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Friday, December 21, 2007 9:11 AM > To: ked >

[PHP] about __get,__set Overloading, read-only properties

2007-12-20 Thread ked
tion (defined in "__set" function). Distinctly, a read-only property could not be change via "$obj->attribute = '' " , but is could be change via $this->id='', inside of class , isn't it ? How to modify __set

[PHP] How to new a Object via class name String?

2007-12-16 Thread ked
Hi , I'm a freshman in PHP, can anyone give me any advices? I defied some simple classes, like "User", "Item"... in a general way , $obj = new User(); specially, I need to assign a Object via a class name . Now , my code : switch ($className) { case "User": return new User(); br

RE: [PHP] LoadXML trouble

2007-12-10 Thread ked
first, create "dealxml.php" with ansi charset : ked tickcenter train back 1197026188_ec76 KO 500 Internal Server Error XML; $xml = new DOMDocument(); //$xml->validateOnParse = true; $xml->loadXML( $r ); $customer_id = $xml->getElementsByTagName( &