Re: [PHP] exec to launch putty.exe for telnet

2012-07-03 Thread Matijn Woudt
On Tue, Jul 3, 2012 at 8:24 PM, Devang Patel wrote: > Hello Experts, > > I have putty.exe on my desktop so if I will go to command prompt and then > to C:\Documents and Settings\user\Desktop location and execute following > command it will launch the Putty window of telnet connection to server >

[PHP] exec to launch putty.exe for telnet

2012-07-03 Thread Devang Patel
Hello Experts, I have putty.exe on my desktop so if I will go to command prompt and then to C:\Documents and Settings\user\Desktop location and execute following command it will launch the Putty window of telnet connection to server specified: putty.exe telnet://10.3.215.15/ I am trying to l

Re: [PHP] Way to test if variable contains valid date

2012-07-03 Thread Erwin Poeze
Or you could use a regular expression: $probe = '2000-01-01'; $found = preg_match('/(19|20)\d\d[- \.](0[1-9]|1[012])[- \.](0[1-9]|[12][0-9]|3[01])/', $probe); var_dump($found==1); Erwin 2012/7/3 shiplu > > > > > > I want to thank you, Daniel, for this help. - I was looking for an > > "isarray

Re: [PHP] Way to test if variable contains valid date

2012-07-03 Thread shiplu
> > > I want to thank you, Daniel, for this help. - I was looking for an > "isarray" type function There is no such function or facility in php. However you can check date in string by DateTime object also try { $date = new DateTime('2000-01-01'); } catch (Exception $e) { echo $e->getMe

Re: [PHP] Destructor not called when extending SimpleXMLElement

2012-07-03 Thread Nick Chalk
Thanks Erwin and Matijn. On 2 July 2012 17:32, Matijn Woudt wrote: > This is most likely a bug in PHP. A deconstructor is called when there > are no references left to the object. Since this class uses the libXML > library, it is likely that there are still references from the libXML > open on th

Re: [PHP] How does this code work?

2012-07-03 Thread tamouse mailing lists
On Tue, Jul 3, 2012 at 2:31 AM, Robert Williams wrote: > On Jul 2, 2012, at 22:15, "Jim Lucas" wrote: > Hmm, I wonder if those thirty years are having a different sort of impact on > me, in the form of decaying eyesight I've had to tweak up the default fonts on things... *sigh* -- PHP Gen

Re: [PHP] PDO Prevent duplicate field names?

2012-07-03 Thread tamouse mailing lists
On Mon, Jul 2, 2012 at 5:38 PM, Scott Baker wrote: > It was my mistake, and the SQL was easily fixed. But it woulda been nice > to have PHP realize there was a dupe when it was building that array to > return to me. This is just not a province of PHP. What sort of behaviour would one expect PHP t

Re: [PHP] How does this code work?

2012-07-03 Thread Robert Williams
On Jul 2, 2012, at 22:15, "Jim Lucas" wrote: > I think you missed something here... > > The above function uses strtr() not strstr() Wow. I knew there had to be a simple, logical explanation (there was), that it would likely be one of those stupid things that I'd spot in two seconds the next m