Re: [PHP] How do YOU set default function/method params?

2009-10-11 Thread Stephan Ebelt
On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the problem... [...] Now, we

[PHP] PHP function unpack

2009-10-11 Thread Gabriel Hahmann
Hi, I'm new to the list and I've search internet and didn't find an answer to my problem. I'm converting a perl script to PHP and I've done almost everything. The only part of the code that I didn't get working on PHP was: (PERL CODE) foreach ($b_length,$b_mac,$b_crlf,$b_crlf,$a_body) {

[PHP] Re: Insult my code!

2009-10-11 Thread Eric Bauman
On 7/10/2009 5:34 PM, Eric Bauman wrote: Hi there, I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to implement a super-tiny MVC framework. I've created some mockups of how the framework might be used based around a very simple 'bank', but I'm

Re: [PHP] How do YOU set default function/method params?

2009-10-11 Thread Jim Lucas
Stephan Ebelt wrote: On Mon, Oct 05, 2009 at 05:48:32PM -0700, Jim Lucas wrote: Here is a problem that I have had for years now. I have been trying to come up with the perfect solution for this problem. But, I have come down to two different methods for solving it. Here is the problem...

[PHP] php exception handling

2009-10-11 Thread Lars Nielsen
Hi, I am trying to make an exception class that emails the errors to myself. I have started by using the example by ask at nilpo dot com on http://dk2.php.net/manual/en/language.exceptions.php. It work ok but i want it NOT to show the errors on the php-page but only show the details in the email

Re: [PHP] Newbie: Array of objects iteration

2009-10-11 Thread Tommy Pham
- Original Message From: MEM tal...@gmail.com To: Tommy Pham tommy...@yahoo.com; php-general@lists.php.net Sent: Sat, October 10, 2009 2:49:23 AM Subject: RE: [PHP] Newbie: Array of objects iteration MEM, http://www.php.net/language.oop5.reflection Regards, Tommy

Re: [PHP] php exception handling

2009-10-11 Thread Tommy Pham
- Original Message From: Lars Nielsen l...@mit-web.dk To: php-general@lists.php.net Sent: Sun, October 11, 2009 2:18:03 PM Subject: [PHP] php exception handling Hi, I am trying to make an exception class that emails the errors to myself. I have started by using the example by

Re: [PHP] php exception handling

2009-10-11 Thread Larry Garfield
On Sunday 11 October 2009 6:09:46 pm Tommy Pham wrote: Lars, Here's a pseudo code: try { if (!$valid) { throw new Exception(Test failed.); } else { // do something } } catch (Exception $e) { // set/print a user friendly message to send to output // set a detailed

[PHP] Re: php exception handling

2009-10-11 Thread Al
Lars Nielsen wrote: Hi, I am trying to make an exception class that emails the errors to myself. I have started by using the example by ask at nilpo dot com on http://dk2.php.net/manual/en/language.exceptions.php. It work ok but i want it NOT to show the errors on the php-page but only show

[PHP] Need unrounded precision

2009-10-11 Thread Andre Dubuc
Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. I've tried a few methods to accomplish this. If I use 'ini_set' I would need to know the number of digits before the decimal (which, unfortunately, I would not have access to).

Re: [PHP] Need unrounded precision

2009-10-11 Thread Eddie Drapkin
On Fri, Jan 1, 2010 at 9:20 PM, Andre Dubuc aajdu...@webhart.net wrote: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. I've tried a few methods to accomplish this. If I use 'ini_set' I would need to know the number of

Re: [PHP] Need unrounded precision [RESOLVED]

2009-10-11 Thread Andre Dubuc
Thanks Eddie, Actually while waiting for some re[lies, I resolved the problem. I realized that '$elapsed' will always have only two digits before the decimal point. Thus I was able to use 'number_format($elapsed, 2);' and to give me the desired result. Thanks for the quick reply! Andre On

Re: [PHP] Need unrounded precision

2009-10-11 Thread Jim Lucas
Andre Dubuc wrote: Hi, I need to extract the first digit after the decimal point from a number such as 28.56018, which should be '5'. I've tried a few methods to accomplish this. If I use 'ini_set' I would need to know the number of digits before the decimal (which, unfortunately, I would

Re: [PHP] Need unrounded precision

2009-10-11 Thread Andre Dubuc
Yup! I had noticed that I had forgot to reset to today's date after working on the code, just after I sent the messages. Thanks. Andre On October 11, 2009 09:14:56 pm Jim Lucas wrote: Andre Dubuc wrote: Hi, I need to extract the first digit after the decimal point from a number such

[PHP] security/deployment issue

2009-10-11 Thread Augusto Flavio
Hi everybody, i have a doubt about my security and deployment methods. Today i manage several projects and these projects are versioned with subversion. My environment is something like this: 1. The developer make some update in the source code of a project. (from your IDE, generally netbeans)

Re: [PHP] security/deployment issue

2009-10-11 Thread James McLean
On Mon, Oct 12, 2009 at 4:06 PM, Augusto Flavio afla...@gmail.com wrote: i have a doubt about my security and deployment methods. Today i manage several projects and these projects are versioned with subversion. My environment is something like this: 1. The developer make some update in the