Re: [PHP] professional code quick tip

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:47, Thorsten Suckow-Homberg wrote: You could use the following statement: ?php switch (true) { case (0 $n = 4): $f = 1; break; case (5 $n = 7): $f = 2; break; case (8 $n = 12): $f = 3; break; default: $f = 4; break; } I'm certain that is illegal.

Re: [PHP] help out a noob w/ include switch?

2005-09-20 Thread Thorsten Suckow-Homberg
[...] Try the following: 1) include() will only trigger a warning if the requested file is not within the include path. Thus, to make sure the file is found, you should use require() which triggers a fatal error and prevends the script from being executed if the given filename as the

Re: [PHP] professional code quick tip

2005-09-20 Thread Thorsten Suckow-Homberg
I'm certain that is illegal. Wanna bet? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] professional code quick tip

2005-09-20 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Tue, 2005-09-20 at 19:47, Thorsten Suckow-Homberg wrote: You could use the following statement: ?php switch (true) { case (0 $n = 4): $f = 1; break; case (5 $n = 7): $f = 2; break; case (8 $n = 12): $f = 3; break; default: $f = 4; break; } I'm certain that is

Re: [PHP] professional code quick tip

2005-09-20 Thread Robert Cummings
On Tue, 2005-09-20 at 19:55, Thorsten Suckow-Homberg wrote: I'm certain that is illegal. Wanna bet? :) $100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) snaffu:~ php foo.php Content-type: text/html X-Powered-By: PHP/4.4.0 br /

Re: [PHP] professional code quick tip

2005-09-20 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Tue, 2005-09-20 at 19:55, Thorsten Suckow-Homberg wrote: I'm certain that is illegal. Wanna bet? :) $100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) Fair enough, but I believe it was the use of the

Re: [PHP] professional code quick tip

2005-09-20 Thread Thorsten Suckow-Homberg
$100... cuz I'm sure you didn't mean to compound those conditionals such that PHP doesn't understand them ;) nargh... yes you're right... send me your account information along with your paypal login. I'll send you the money asap ;) -- PHP General Mailing List (http://www.php.net/) To

[PHP] SUCCESS! Re: help out a noob w/ include switch?

2005-09-20 Thread jay thompson
Thank you all for the kind help. I have The site working now (once i move it from the test loc. I'll post a link here. It's for a performance art festival here in vancouver). The was actually with $_GET in the switch as suggested by Ben. Thnks! I do however know about it's usage and even

Re: [PHP] professional code quick tip ---last---

2005-09-20 Thread adriano ghezzi
thx to all -- final release good nigh! $f=0; if ( $ar[0]0 and $ar[0]=12) $f=1; elseif ( $ar[0]12 and $ar[0]=14) $f=2; elseif ( $ar[0]14 and $ar[0]=18) $f=3;

[PHP] Re: SUCCESS! Re: help out a noob w/ include switch?

2005-09-20 Thread Ben
jay thompson said the following on 09/20/05 17:35: Thank you all for the kind help. I have The site working now (once i move it from the test loc. I'll post a link here. It's for a performance art festival here in vancouver). The was actually with $_GET in the switch as suggested by Ben.

[PHP] Wikimedia - php4

2005-09-20 Thread Vizion
Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. After starting the program after a successful installation I get the error messages shown below. There are three eror from two lines of code. I have included the relevant code. Having just started to learn php, I am not

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Jasper Bryant-Greene
Vizion wrote: Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. I think you mean MediaWiki (common mistake!) After starting the program after a successful installation I get the error messages shown below. There are three eror from two lines of code. I have included the

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 19:26, the author Vizion contributed to the dialogue on- [PHP] Wikimedia - php4: Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. After starting the program after a successful installation I get the error messages shown below. There are three

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 19:37, the author Jasper Bryant-Greene contributed to the dialogue on- Re: [PHP] Wikimedia - php4: Vizion wrote: Hi I have just installed wikimedia on freebsd 5.3 with php4-4.4.0. I think you mean MediaWiki (common mistake!) After starting the program after

[PHP] losing session data with cross-site scripting

2005-09-20 Thread Steve Lefevre
Hey folks - I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially crafted get links and forms. The

Re: [PHP] losing session data with cross-site scripting

2005-09-20 Thread Jasper Bryant-Greene
Steve Lefevre wrote: I have a php site on a production server. The production server doesn't have the spell libraries, and rather than migrate the site, we setup spell checking functions on the development site, and shuttled the users back and forth with specially crafted get links and forms.

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Vizion wrote: Notice: Only variable references should be returned by reference in /usr2/virtualwebs/forumkatrina.org/wiki/includes/ObjectCache.php on line 369 Notice: Only variable references should be returned by reference in

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Vizion wrote: function setupTemplate( $classname, $repository=false, $cache_dir=false ) { return new $classname(); ^^ } Is that really all they have in that function? It seems rather useless to me. Why call a function just

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: And for PHP5 you can just drop all references related to objects and it will do the right thing. Eeeek, that's not entirely true. Sometimes you want a real reference to an object even in PHP5 :/ Cheers, Rob. --

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Robert Cummings wrote: On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: And for PHP5 you can just drop all references related to objects and it will do the right thing. Eeeek, that's not entirely true. Sometimes you want a real reference to an object even in PHP5 :/ $a = new foo();

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 01:08, Rasmus Lerdorf wrote: Robert Cummings wrote: On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: And for PHP5 you can just drop all references related to objects and it will do the right thing. Eeeek, that's not entirely true. Sometimes you want a real

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Vizion
On Tuesday 20 September 2005 22:14, the author Robert Cummings contributed to the dialogue on- Re: [PHP] Wikimedia - php4: On Wed, 2005-09-21 at 01:08, Rasmus Lerdorf wrote: Robert Cummings wrote: On Wed, 2005-09-21 at 00:58, Rasmus Lerdorf wrote: And for PHP5 you can just drop all

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Rasmus Lerdorf
Robert Cummings wrote: I think you mean novice use. There are certainly times when assigning an object to a variable I want all the values currently referring to that object to see the update and not just the variable being assigned to. I understand that objects in PHP5 are passed by reference

Re: [PHP] Wikimedia - php4

2005-09-20 Thread Robert Cummings
On Wed, 2005-09-21 at 01:20, Rasmus Lerdorf wrote: Robert Cummings wrote: I think you mean novice use. There are certainly times when assigning an object to a variable I want all the values currently referring to that object to see the update and not just the variable being assigned to. I

<    1   2