Re: [PHP] Re: dynamic copyright in page footer?

2011-04-30 Thread Sharl.Jimh.Tsin
it is very useful to me.thanks. Best regards, Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**) 2011/4/30 Mark Kelly : > On Saturday 30 Apr 2011 at 14:28 Nathan Rixham wrote: > >> echo implode(",", range(2011,date("Y"))); > > What an elegant solution! Thank you. > > -- > PHP General Ma

Re: Re: [PHP] Spaces in filename or path

2011-04-30 Thread Ashley Sheridan
"Tim Streater" wrote: >On 30 Apr 2011 at 22:33, Richard Quadling wrote: > >> On 30 April 2011 22:07, Tim Streater wrote: >>> Does it matter to PHP filesystem functions if a path/to/file/name >contains >>> spaces? IOW, is this handled OK by design or should I replaces such >spaces by >>> backsla

Re: Re: [PHP] Spaces in filename or path

2011-04-30 Thread Tim Streater
On 30 Apr 2011 at 22:33, Richard Quadling wrote: > On 30 April 2011 22:07, Tim Streater wrote: >> Does it matter to PHP filesystem functions if a path/to/file/name contains >> spaces? IOW, is this handled OK by design or should I replaces such spaces by >> backslash-space or would doing that pr

Re: [PHP] Spaces in filename or path

2011-04-30 Thread Richard Quadling
On 30 April 2011 22:07, Tim Streater wrote: > Does it matter to PHP filesystem functions if a path/to/file/name contains > spaces? IOW, is this handled OK by design or should I replaces such spaces by > backslash-space or would doing that present problems? > > Thanks  --  tim On Windows, PHP wi

[PHP] Spaces in filename or path

2011-04-30 Thread Tim Streater
Does it matter to PHP filesystem functions if a path/to/file/name contains spaces? IOW, is this handled OK by design or should I replaces such spaces by backslash-space or would doing that present problems? Thanks -- tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Peter Lind
On 30 April 2011 21:26, Andre Polykanine wrote: > Hello Peter, > > And what would you recommend as an Html sanitizing tool? > I go by htmlpurifier when I need to sanitize html. I generally try to avoid the issue though, by having users use other markup languages (I like markdown but dislike texti

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Andre Polykanine
Hello Peter, And what would you recommend as an Html sanitizing tool? -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message ---

Re: [PHP] Why Constants could Not be Array?

2011-04-30 Thread Stuart Dallas
On Saturday, 30 April 2011 at 17:52, Andre Polykanine wrote: Hello Walkinraven, > > I use serialize for that. > define("MY_CONSTANT", serialize(array("1", "2", "hello"))); > > -- > With best regards from Ukraine, > Andre > Skype: Francophile > My blog: http://oire.org/menelion (mostly in Russian

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Andre Polykanine
Hello Dave, echo "Copyright © Dave Mehler, 2011 — ".date("Y").""; -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message ---

Re: [PHP] Why Constants could Not be Array?

2011-04-30 Thread Andre Polykanine
Hello Walkinraven, I use serialize for that. define("MY_CONSTANT", serialize(array("1", "2", "hello"))); -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Lars Nielsen
lør, 30 04 2011 kl. 11:18 +, skrev dholmes1...@gmail.com: > Something simple like this would work > $date=date('Y'); > $startdate='2011'; > if($date == $startdate) { > echo $startdate > } else { > Echo $startdate; > Echo '-'; > echo $date; > > } > Sent via BlackBerry from T-Mobile > > -

Re: [PHP] postgresql database access failure

2011-04-30 Thread Daniel Brown
On Sat, Apr 30, 2011 at 12:23, Daniel Brown wrote: >> >>        >                echo '$_SERVER['HTTP_USER_AGENT']'; >>        ?> > >    First of all, no it doesn't.  Placed inside single quotes, it'll > not only try to return it verbatim (i.e. - the variable would be > printed to screen), but it'

Re: [PHP] postgresql database access failure

2011-04-30 Thread Daniel Brown
Readers? Sounds like you spend too much time writing newsletters (to the wrong address, since php-general-digest-h...@lists.php.net is a self-help command list for digest-form subscriptions). ;-P On Sat, Apr 30, 2011 at 04:41, e-letter wrote: >                        $db = pg_connect('dbnam

Re: [PHP] Re: dynamic copyright in page footer?

2011-04-30 Thread Mark Kelly
On Saturday 30 Apr 2011 at 14:28 Nathan Rixham wrote: > echo implode(",", range(2011,date("Y"))); What an elegant solution! Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: dynamic copyright in page footer?

2011-04-30 Thread Nathan Rixham
David Mehler wrote: Hello, I am trying to use php to put a copyright notice in a page footer. I'm using the date function with the "Y" value for the year. Here's the code: echo implode(",", range(2011,date("Y"))); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Peter Lind
On 30 April 2011 15:13, Stuart Dallas wrote: > On Friday, 29 April 2011 at 22:04, Andre Polykanine wrote: > Hi everyone, >> I allow my users to put some Html into their blogs. I filter it using >> a great tool called HtmLawed and written by Dr. Santosh Patnaik (if >> you're reading this, many than

Re: [PHP] What's faster using if else or arrays?

2011-04-30 Thread Stuart Dallas
On Saturday, 30 April 2011 at 03:17, Tamara Temple wrote: > On Apr 29, 2011, at 8:32 AM, Robert Cummings wrote: > > > On 11-04-29 08:04 AM, Steve Staples wrote: > > > On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote: > > > > On 11-04-28 06:37 PM, dholmes1...@gmail.com wrote: > > > > > Tha

Re: [PHP] gd Graphics Library Question (EXIF)

2011-04-30 Thread Stuart Dallas
On Saturday, 30 April 2011 at 03:32, Mitch wrote: I was wondering about that. Since I am not actually hosting my ISP would > have to have it loaded (or compiled into their PHP implementation), right? You may be able to use http://php.net/dl to load the extension (you'll need to build it to be co

Re: [PHP] Wiki formatting class or something similar

2011-04-30 Thread Stuart Dallas
On Friday, 29 April 2011 at 22:04, Andre Polykanine wrote: Hi everyone, > I allow my users to put some Html into their blogs. I filter it using > a great tool called HtmLawed and written by Dr. Santosh Patnaik (if > you're reading this, many thanks to you!). > However, I would like to give them a p

Re: [PHP] Why Constants could Not be Array?

2011-04-30 Thread Stuart Dallas
On Saturday, 30 April 2011 at 10:51, Walkinraven wrote: For needing a constants=array, I have to use > 'public static $a = array(...)' > > instead. > > Why the language could not relax the restriction of constants? As I understand it constants must be declarations not evaluations because they'r

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Geoff Lane
On Saturday, April 30, 2011, Simon J Welsh wrote: > I would use something simple like: > if(date('Y') == '2011') { > echo '2011'; > } else { > echo '2011-', date('Y'); > } ... or in one line: echo (date('Y') != '2011' ? '2011-' : '') . date('Y'); However, you might want to chang

Re: [PHP] Re: Flattery will get you nowhere

2011-04-30 Thread Marc Guay
>  Dinna know bats even _had_ eyelids They increase the effectiveness of evil spells by 50%, especially when coupled with Frogs Tears (tm). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread dholmes1031
Something simple like this would work $date=date('Y'); $startdate='2011'; if($date == $startdate) { echo $startdate } else { Echo $startdate; Echo '-'; echo $date; } Sent via BlackBerry from T-Mobile -Original Message- From: David Mehler Date: Sat, 30 Apr 2011 07:06:17 To: php-general

Re: [PHP] dynamic copyright in page footer?

2011-04-30 Thread Simon J Welsh
On 30/04/2011, at 11:06 PM, David Mehler wrote: > Hello, > > I am trying to use php to put a copyright notice in a page footer. I'm > using the date function with the "Y" value for the year. Here's the > code: > > echo date ('Y'); > ?> > > This works great for a site done in 2011 but next year

[PHP] dynamic copyright in page footer?

2011-04-30 Thread David Mehler
Hello, I am trying to use php to put a copyright notice in a page footer. I'm using the date function with the "Y" value for the year. Here's the code: This works great for a site done in 2011 but next year I'm going to want to have 2011 and 2012 in the copyright notice, adding an additional ye

[PHP] Why Constants could Not be Array?

2011-04-30 Thread Walkinraven
For needing a constants=array, I have to use 'public static $a = array(...)' instead. Why the language could not relax the restriction of constants? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] postgresql database access failure

2011-04-30 Thread e-letter
Readers, A postgresql database (local disk installation) is successfully accessed as a normal user: psql -U username databasename However, creating a php file to access the database has not been successful. why does this fail? The followin