[PHP] date( ) - function

2002-02-05 Thread soma

i have one question

linux system's time is right but php's date () function time is wrong...

different system time and php's date( ) time

is date () function call to the system time ?

thansk

/soma



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




[PHP] Session abuse?

2001-03-13 Thread Soma Interesting


I'm wondering about the limitations of session variables in PHP4 with 
regards to over-use. For example I've been taking huge advantage of them 
and would like to store about 14k per session - its actually only three or 
four variables, but one of them is multiple depth array. Does this seem a 
reasonable use of session variables, or have I gone too far? :)


Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] International support

2001-02-22 Thread Soma Interesting

Hello everyone,

I'm currently working a project that is intended to handle Japanese 
character sets - and now I'm told ideally iMode too. :) The iMode isn't 
such an issue at the moment - but the article below has spooked me a 
little. At an early point in the project we tested if putting some input 
into a web form, which ultimately was handled by php then stored in 
postgres would return fully intact - and it did. This left me comfortable 
that PHP and Postgres don't seem to care what language they're storing in 
fields or variables. I'm 'guessing' that this is because the data, whether 
its English or Japanese is being stored in binary (or something else?). Of 
course I wouldn't be able to sort the data or do anything else that would 
require PHP/Postgres to be able to interpret the data. However if I compile 
Postgres with locals support for the character set/language in question - 
then postgres will be able to sort Japanese. Is this right?

Have I got this all right so far? I have attempted to do my research on 
this - but finding a real beginners guide to international web development 
has been a trick. And the best sources I have found on this topic generally 
are specific to Oracle. Any links would be appreciated.

Ok the next part of this message is an article I thought would be generally 
interesting so I'm not hesitating to post it entirely. It was forwarded to 
me so I'm not sure of the source.

For the postgres folks, these developers went with MySQL - I've chosen 
Postgres. Is there anything MySQL does that Postgres doesn't in terms of 
language support that I should be aware of?

>Back to case study
>r-newbold.com
>
>George Baptista is riding the wave of the latest technology with his 
>company's newest venture: 
>r-newbold.com, a 
>wireless i-Mode site created with PHP.
>
>Based in Tokyo, George is a Web developer and co-partner with Izumi 
>Hiroshima at Studio Omame. He 
>was part of the creative team behind the Japanese-language site, and he is 
>finding that i-Mode is not only fashionable, but also the face of the future.
>
>r-newbold.com was developed for British fashion designer, Paul Smith. NTT 
>DoCoMo's i-Mode Web-browsing cellular phones, which already have over 10 
>million users, offers a fast wireless data service with Internet access. 
>In Japan, it's been a hit with the younger generation. And since 
>r-newbold.com's target population is young, hip and fashionable, the 
>decision to create an i-Mode site rather than a regular Web site made 
>perfect sense.
>
>PHP and i-Mode: The perfect match
>"i-Mode is exploding in Japan," George adds. "It offers new and 
>interesting challenges to the developer. The i18n J version of PHP is an 
>increasingly popular choice for developers [in Japan] because of its 
>overall performance, speed of development, and character set capability 
>features."
>
>George and his team at Studio Omame have already been using PHP for about 
>a year prior to developing the r-newbold site, and were very pleased with 
>its performance. He cites several reasons for his company's choice of PHP 
>including:
>* PHP's overall performance and reliability
>* ease with which to prototype in
>* PHP's large and growing developer base
>"There are a growing number of developers in Tokyo using it. We also knew 
>there was ample support on both main and Japanese PHP mailing lists for 
>any problems that might come up," George says.
>"PHP became especially useful to us when Shigeru Kanemoto, Hironori Neal 
>Sato and a few other developers worked to release a version of PHP 
>3.0.15-i18n. We are looking forward to this same core of people to also 
>soon release an i18n J version of PHP 4. We expect it will provide us with 
>even greater speed and performance than PHP 3."
>Studio Omame's decision to use PHP was welcomed by Paul Smith's company. 
>The open-source nature of the product was simply not an issue. "We 
>suggested PHP, and there was no problem. They were happy about the 
>cost-savings involved," George recalls.
>
>PHP's Japanese challenge
>Since r-newbold.com is in Japanese only, Studio Omame made sure to utilize 
>PHP's Japanese character set conversion functions. However, this proved to 
>be a challenge.

Is this available for v4 of PHP yet?

>"Dealing with character sets when developing for the Japanese market is a 
>headache," George says. "There's not one, but 3 character sets in wide 
>use: SJIS, EUC and JIS.
>
>"We used all of them for this project. All output for the i-Mode platform 
>needs to be SJIS, while input to MySQL is in EUC, and data for mailing was 
>encoded in JIS. Ensuring the integrity of data via character set 
>conversion was a very important factor. Ultimately, PHP made this project 
>much smoother and very enjoyable. Not having to worry about character set 
>mangling is a godsend."
>
>There was also the task of adapting PHP from computers to te

[PHP] Here Doc syntax

2001-02-19 Thread Soma Interesting


I'm having a real love/hate relationship with PHP's here-doc support.

I love that it spares me from breaking in and out of PHP mode or using echo 
and back slashes for outputting largish bodies of dynamic HTML

but I hate a) that the EOT; has to be the first thing on the line and b) I 
find that here-doc seems to make scripts unparsable on many occasions and I 
can never find the bug. I'd say 1/5 times I wind up breaking the script 
just sticking an:

echo <<


{$error}



EOT;

into a page some place. Any suggestions from anyone?

Appreciated.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] parse speed vs require speed

2001-02-13 Thread Soma Interesting


I'm wondering if I should organize the functions for my project into a 
single large file and have only one include/require, or break the code out 
into separate function library files and use a number of includes/requires.

With a single large function library I'm guessing PHP would parse this 
every time a page is called. So I could loose some overhead by separating 
my database functions into one file, my administration functions into 
another, my presentation functions into another, etc... then only including 
the function pages necessary - likely cutting the amount of code being 
parsed in half for any given page.

But then I begin wondering about the speed of making a require() to each of 
these files. maybe three to five requires per page.

Lastly, what about caching or compiling the function libraries so they're 
not being parsed each time?

Any advice on this?


-  -  -  -  -  -  - 
  -  -  -  -
WARNING: Some experts believe that use of any keyboard may cause
serious injury. Consult Users Guide.
   
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]