[PHP] Re: PCRE regex result is different between Linux & Windows.

2008-11-08 Thread Lupus Michaelis

ClapClap a écrit :


For the PCRE version, I really can not tell you which one I use...
Where can I see that ?


  In the the output from phpinfo function.


So, It may be a bug ? Too bad...


  I remember some change behavior recently in PCRE. But I am not sure, 
I want just to drop this option first.


--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing Web Page

2008-11-08 Thread Ashley Sheridan
On Sat, 2008-11-08 at 08:01 -0500, Patrick Moloney wrote:
> Ashley Sheridan wrote:
> > On Thu, 2008-11-06 at 22:35 +0100, Frank Arensmeier wrote:
> >> 6 nov 2008 kl. 21.21 skrev Patrick Moloney:
> >>
> >>> I'd like to enable my users to print individual web pages from their  
> >>> browser. If they simply select the browser print button they don't  
> >>> get all the text that is displayed in a scrolling text area.
> >>> The web page is static html and css, in a php file.
> >>>
> >> This might be a good starting point.
> >>
> >> http://www.alistapart.com/articles/printyourway
> >>
> >> //frank
> >>
> >>
> > 
> > 
> > Then set out your CSS in print.css to lay out the page without scrolling
> > areas.
> > 
> > 
> > Ash
> > www.ashleysheridan.co.uk
> > 
> 
> Thanks all! So, to state the obvious (to you all) the solution is to 
> address my original question through CSS. That sounds good.
> Ashly, your post is helpful. What is the next step, to display the page 
> on screen using the new stylesheet, then rely on the user to use the 
> browsers print button?
> 
> Thanks,
> Patrick
> 
> 
Easier than that even, the browser automatically selects this stylesheet
when the user presses the print button (or you issue a window.print()
from javascript) because it recognises the media="print" attribute. You
can use the media type for other browsers too, like audio, print,
screen, projectors, etc.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Printing Web Page

2008-11-08 Thread Patrick Moloney

Ashley Sheridan wrote:

On Thu, 2008-11-06 at 22:35 +0100, Frank Arensmeier wrote:

6 nov 2008 kl. 21.21 skrev Patrick Moloney:

I'd like to enable my users to print individual web pages from their  
browser. If they simply select the browser print button they don't  
get all the text that is displayed in a scrolling text area.

The web page is static html and css, in a php file.


This might be a good starting point.

http://www.alistapart.com/articles/printyourway

//frank





Then set out your CSS in print.css to lay out the page without scrolling
areas.


Ash
www.ashleysheridan.co.uk



Thanks all! So, to state the obvious (to you all) the solution is to 
address my original question through CSS. That sounds good.
Ashly, your post is helpful. What is the next step, to display the page 
on screen using the new stylesheet, then rely on the user to use the 
browsers print button?


Thanks,
Patrick


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] strtotime

2008-11-08 Thread gilles
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en 
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: strtotime

2008-11-08 Thread Maciek Sokolewicz

gilles wrote:
Avec la version 4 de php, strtotime("20080950") fonctionne correctement en 
allant sur le mois d'octobre, alors qu'en version 5: 19700101.
Merci de votre aide 





This is an ENGLISH list, please rephrase your question in english and 
people might understand.


Cette liste est une liste anglaise, reformulent svp votre question en 
anglais svp.


merci,

- Tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: strtotime

2008-11-08 Thread Bastien Koert
2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>

> gilles wrote:
>
>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>> Merci de votre aide
>>
>>
> This is an ENGLISH list, please rephrase your question in english and
> people might understand.
>
> Cette liste est une liste anglaise, reformulent svp votre question en
> anglais svp.
>
> merci,
>
> - Tul
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I'll translate

In PHP4, strtotime works fine

in PHP5 strtotime gives a result of 19700101 when the data entered was
strtotime("20080950")

-- 

Bastien

Cat, the other other white meat


[PHP] htmlentities() and default_charset

2008-11-08 Thread Jim Hermann - UUN Hostmaster
Folks,

Why should htmlentities() use the default_charset for $charset with this
example, taken from ext/standard/tests/strings/htmlentities10.phpt?



The test script expects the output to be:
string(28) "‚†™Ÿ"

According to the PHP Manual, the htmlentities() syntax is:

string htmlentities  ( string $string  [, int $quote_style  [, string
$charset  [, bool $double_encode  ]]] )

For the parameter charset:

"Like htmlspecialchars(), it takes an optional third argument charset which
defines character set used in conversion. Presently, the ISO-8859-1
character set is used as the default."  It goes on to list the supported
values for charset and states:  "Note:  Any other character sets are not
recognized and ISO-8859-1 will be used instead."

Therefore, when $charset = '' I would expect that
htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '') would use ISO-8859-1 since
the null string is not listed as a supported value.  Also, it does not
mention the use of default_charset.  Furthermore, when default_charset = '',
PHP states that ISO-8859-1 will be used as the default.

Since the $charset is optional, I would expect
htmlentities("\x82\x86\x99\x9f", ENT_QUOTES) would use the default_charset,
but not htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '').  However, test
scripts ext/standard/tests/strings/htmlentities10.phpt, htmlentities11.phpt,
and htmlentities13.phpt all expect the default_charset to be used when
charset=''.

Thanks.

Jim
-
Jim Hermann <[EMAIL PROTECTED]>
UUism Networks 
Ministering to the Needs of Online UUs
Web Hosting, Email Services, Mailing Lists
-


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PCRE regex result is different between Linux & Windows.

2008-11-08 Thread ClapClap

Lupus Michaelis a écrit :

ClapClap a écrit :


For the PCRE version, I really can not tell you which one I use...
Where can I see that ?


  In the the output from phpinfo function.



Thanks.
My versions of PCRE :
- Linux 7.4 2007-09-21 (PHP 5.2.4-2ubuntu5.3)
- Windows XP 7.2 2007-06-19 (PHP 5.2.4)


So, It may be a bug ? Too bad...


  I remember some change behavior recently in PCRE. But I am not sure, I 
want just to drop this option first.




Yeah !
It's probably that. I hope...
Too bad.

--
Julien


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: strtotime

2008-11-08 Thread Micah Gersten
Bastien Koert wrote:
> 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
>
>   
>> gilles wrote:
>>
>> 
>>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
>>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
>>> Merci de votre aide
>>>
>>>
>>>   
>> This is an ENGLISH list, please rephrase your question in english and
>> people might understand.
>>
>> Cette liste est une liste anglaise, reformulent svp votre question en
>> anglais svp.
>>
>> merci,
>>
>> - Tul
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> 
> I'll translate
>
> In PHP4, strtotime works fine
>
> in PHP5 strtotime gives a result of 19700101 when the data entered was
> strtotime("20080950")
>
>   
What does "work fine" mean?  "20080950" isn't normal, so what is the
expected result?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: strtotime

2008-11-08 Thread Ashley Sheridan
On Sat, 2008-11-08 at 18:57 -0600, Micah Gersten wrote:
> Bastien Koert wrote:
> > 2008/11/8 Maciek Sokolewicz <[EMAIL PROTECTED]>
> >
> >   
> >> gilles wrote:
> >>
> >> 
> >>> Avec la version 4 de php, strtotime("20080950") fonctionne correctement en
> >>> allant sur le mois d'octobre, alors qu'en version 5: 19700101.
> >>> Merci de votre aide
> >>>
> >>>
> >>>   
> >> This is an ENGLISH list, please rephrase your question in english and
> >> people might understand.
> >>
> >> Cette liste est une liste anglaise, reformulent svp votre question en
> >> anglais svp.
> >>
> >> merci,
> >>
> >> - Tul
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >> 
> > I'll translate
> >
> > In PHP4, strtotime works fine
> >
> > in PHP5 strtotime gives a result of 19700101 when the data entered was
> > strtotime("20080950")
> >
> >   
> What does "work fine" mean?  "20080950" isn't normal, so what is the
> expected result?
> 
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
> 
> 
> 
Well, for starts Micah is right, your date string will be interpreted as
the 50th of September, 2008, which isn't valid and defaults to the time
represented by the timestamp 0. If you want to turn 8-digit number
strings into timestamps, make sure of two things:

1.It's actually a string and not a number
2.The string is in the format mmdd

The strings can be a variety of formats, all found at
http://www.gnu.org/software/shishi/manual/html_node/Date-input-formats.html 
which is a link available on the strtotime manual page.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP - Web/list Question...

2008-11-08 Thread bruce
Hi.

I've got a question/issue that I want to bounce off the list.

I have a list that extends over multiple pages. there might be 200 items,
and i don't want to have the items listed on the same page as it would be
too long. i can break the list up, so i can have it be displayed over
multiple pages. however, i want the user to select different items from the
list. given that the selected items might be over different pages, what's
the best way of keeping a running track of the items that have been
selected??

I could have each page be a form, and do a post/get where i then keep track
of the selected items from page to page, but that would appear to get ugly.
i'm looking for pointers to other sites/code that might have already
implemented this kind of scenario.

thoughts/pointers would be appreciated...


thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP - Web/list Question...

2008-11-08 Thread Wolf

 bruce <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I've got a question/issue that I want to bounce off the list.
>
> I have a list that extends over multiple pages. there might be 200 items,
> and i don't want to have the items listed on the same page as it would be
> too long. i can break the list up, so i can have it be displayed over
> multiple pages. however, i want the user to select different items
from the
> list. given that the selected items might be over different pages, what's
> the best way of keeping a running track of the items that have been
> selected??
>
> I could have each page be a form, and do a post/get where i then keep
track
> of the selected items from page to page, but that would appear to get
ugly.
> i'm looking for pointers to other sites/code that might have already
> implemented this kind of scenario.

You use a database, form on each page adds to a temp table on the
database, when they have verified them all (if that is something they
can do) OR have finished whatever form/survey you have them doing, then
you write the temp table info to the one you want to keep.

You could do some of that with ajax as well, but if you want to break up
a 200 item list, you are looking at a database to store the info in the
most efficient manner possible.

You could also do it with sessions, but if they get stuck and need to
come back, then if they had to login their session might be different
and they'd have to start over again.

HTH,
Wolf


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP - Web/list Question...

2008-11-08 Thread Robert Cummings
On Sat, 2008-11-08 at 20:26 -0800, bruce wrote:
> Hi.
> 
> I've got a question/issue that I want to bounce off the list.
> 
> I have a list that extends over multiple pages. there might be 200 items,
> and i don't want to have the items listed on the same page as it would be
> too long. i can break the list up, so i can have it be displayed over
> multiple pages. however, i want the user to select different items from the
> list. given that the selected items might be over different pages, what's
> the best way of keeping a running track of the items that have been
> selected??
> 
> I could have each page be a form, and do a post/get where i then keep track
> of the selected items from page to page, but that would appear to get ugly.
> i'm looking for pointers to other sites/code that might have already
> implemented this kind of scenario.
> 
> thoughts/pointers would be appreciated...

Accumulate them in the session. When done, and before final action you
could let them view a summary of selected items and allow deletion of
any entries they don't want.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: strtotime

2008-11-08 Thread Lester Caine

Ashley Sheridan wrote:

I'll translate

In PHP4, strtotime works fine

in PHP5 strtotime gives a result of 19700101 when the data entered was
strtotime("20080950")

  

What does "work fine" mean?  "20080950" isn't normal, so what is the
expected result?



Well, for starts Micah is right, your date string will be interpreted as
the 50th of September, 2008, which isn't valid and defaults to the time
represented by the timestamp 0. If you want to turn 8-digit number
strings into timestamps, make sure of two things:

1.It's actually a string and not a number
2.The string is in the format mmdd

The strings can be a variety of formats, all found at
http://www.gnu.org/software/shishi/manual/html_node/Date-input-formats.html 
which is a link available on the strtotime manual page.


I seem to remember a previous discussion about this 'bug' but I can't track 
the notes. Is it not the case that you can simply add days or months to the 
'number' and then use strtotime to output the 'normalised' date. So adding 30 
to 20th Sept would return 20th October. This very useful feature was corrected 
as a bug in the rewrite of Date in PHP5.1?

Reason for looking for the notes was to remember how one has to do it now 

--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php