Re: [PHP] Re: strtotime

2010-10-17 Thread Tamara Temple
On Oct 17, 2010, at 9:57 PM, Tommy Pham wrote: -Original Message- From: Tamara Temple [mailto:tamouse.li...@gmail.com] On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote: Here is another nifty piece of code I found. How does this work? What is 31556926? Number of second in a ye

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Paul M Foster
On Sun, Oct 17, 2010 at 01:00:44AM -0400, Ethan Rosenberg wrote: > Dear List - > > Here are some questions, which I am sure are trivial, but I am a > newbie, and cannot find the answers online > > I cannot get the following to work. In my Firefox [Iceweasel] > browser, I enter the following

Re: [PHP]About Character Set

2010-10-17 Thread Sharl.Jimh.Tsin
oh,it is none of the PHP language's business. you should work on your Apache Server's Configuration Files. Best regards, Sharl.Jimh.Tsin (From China) 2010/10/17 Ashley Sheridan : > On Sun, 2010-10-17 at 21:56 +0800, 肖晗 wrote: > >> There is a "download" directory(to provide download links) in my

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tommy Pham
On Sun, Oct 17, 2010 at 11:22 AM, Ethan Rosenberg wrote: > > > > Tommy - > > Thanks. > > As I stated, I am a newbie. > > 1] I am trying to shorten the learning curve by asking some questions, which > I understand are probably trivial.  A whole MySQLi list of functions at this > point is to much

RE: [PHP] Re: strtotime

2010-10-17 Thread Tommy Pham
> -Original Message- > From: Tamara Temple [mailto:tamouse.li...@gmail.com] > Sent: Sunday, October 17, 2010 2:33 PM > To: PHP General > Subject: Re: [PHP] Re: strtotime > > > On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote: > > > Here is another nifty piece of code I found. How

[PHP] Re: Fatal error: Allowed memory size of XXXXX bytes exhausted

2010-10-17 Thread Justin Martin
On 10-10-15 04:42 PM, Julien Jabouin wrote: Hello, I have an issu with a script launched by cron. In fact, although i setup php memory_limit to high value (1G or 2Go), i have the same issue. By example with 2G : Output from command /usr/bin/php5 -d memory_limit=2G -f /home/test/www/cron.php

[PHP] Re: Zip files: generate text file in archive on the fly

2010-10-17 Thread Justin Martin
On 10-10-17 03:55 PM, Dotan Cohen wrote: I need to provide a download of a zip archive containing three files. This is fairly straightforward in PHP so long as one is working with files that already exist. However, I need to customise one of the files (a simple text file) with the user name and o

Re: [PHP] Zip files: generate text file in archive on the fly

2010-10-17 Thread Simon J Welsh
Have you considered writing to a temporary file? On 18/10/2010, at 11:55 AM, Dotan Cohen wrote: > I need to provide a download of a zip archive containing three files. > This is fairly straightforward in PHP so long as one is working with > files that already exist. However, I need to customise on

[PHP] Zip files: generate text file in archive on the fly

2010-10-17 Thread Dotan Cohen
I need to provide a download of a zip archive containing three files. This is fairly straightforward in PHP so long as one is working with files that already exist. However, I need to customise one of the files (a simple text file) with the user name and other info before zipping. I see no mention

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tamara Temple
gah, i botched that up. For the first part, you want the following: $cxn = new mysql($host, $user, $password); $res = $cxn->query("create database test22:); if (!$res) { die("Failed to create database test22: " . $cxn->error()); } Then, reopen the

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Tamara Temple
On Oct 17, 2010, at 1:22 PM, Ethan Rosenberg wrote: At 01:41 AM 10/17/2010, Tommy Pham wrote: > I cannot get the following to work. In my Firefox [Iceweasel] browser, I > enter the following URL: [w/ the http] Whenever you get a blank screen running a php application, the place to look i

Re: [PHP] Re: strtotime

2010-10-17 Thread Tamara Temple
On Oct 17, 2010, at 2:34 PM, John Taylor-Johnston wrote: Here is another nifty piece of code I found. How does this work? What is 31556926? Number of second in a year? (31556926 / (24 * 60 * 60) yields 365.2421...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Questions from a Newbie

2010-10-17 Thread a...@ashleysheridan.co.uk
Linux can be run as a GUI, using a window manager. Aside from that, have a look at the manual pages on php.net, which give some good examples of how to use the various mysql functions. Also, on your development machine, its a good idea to turn on errors, as it can indicate where these problems

Re: [PHP] Re: strtotime

2010-10-17 Thread richard gray
On 17/10/2010 21:34, John Taylor-Johnston wrote: Yaay, I'm 45 now :). Here is another nifty piece of code I found. How does this work? What is 31556926? number of seconds in a year...? Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

Re: [PHP] Re: strtotime

2010-10-17 Thread John Taylor-Johnston
Yaay, I'm 45 now :). Here is another nifty piece of code I found. How does this work? What is 31556926? function calculateAge($birthday){ return floor((time() - strtotime($birthday))/31556926); } echo calculateAge('1965-10-17'); http://ca.php.net/manual/en/function.floor.php ---

RE: [PHP] Questions from a Newbie

2010-10-17 Thread Ethan Rosenberg
At 01:41 AM 10/17/2010, Tommy Pham wrote: > -Original Message- > From: Ethan Rosenberg [mailto:eth...@earthlink.net] > Sent: Saturday, October 16, 2010 10:01 PM > To: php-general@lists.php.net > Subject: [PHP] Questions from a Newbie > > Dear List - > > Here are some questions, which I

Re: [PHP]About Character Set

2010-10-17 Thread Ashley Sheridan
On Sun, 2010-10-17 at 21:56 +0800, 肖晗 wrote: > There is a "download" directory(to provide download links) in my site. > http://vedaclub.org/download/ > Some of the filenames contain Chinese characters, which, however cannot be > recognized. > Is there anything I can do to solve problem? > > Thank

RE: [PHP] Re: strtotime

2010-10-17 Thread Tommy Pham
> -Original Message- > From: John Taylor-Johnston [mailto:John.Taylor- > johns...@cegepsherbrooke.qc.ca] > Sent: Saturday, October 16, 2010 10:58 PM > To: PHP-General > Subject: [PHP] Re: strtotime > > According to this, I'm 44 not 45 :)p > > $birthday = '1965-08-30'; > > //calculate yea

Re: [PHP] Re: strtotime

2010-10-17 Thread Tamara Temple
On Oct 17, 2010, at 12:58 AM, John Taylor-Johnston wrote: According to this, I'm 44 not 45 :)p $birthday = '1965-08-30'; //calculate years of age (input string: -MM-DD) function birthday ($birthday){ list($year,$month,$day) = explode("-",$birthday); $year_diff = date("Y") - $year;

[PHP]About Character Set

2010-10-17 Thread 肖晗
There is a "download" directory(to provide download links) in my site. http://vedaclub.org/download/ Some of the filenames contain Chinese characters, which, however cannot be recognized. Is there anything I can do to solve problem? Thanks in advance!

RE: [PHP] Questions from a Newbie

2010-10-17 Thread Tommy Pham
> -Original Message- > From: Alexis [mailto:phplis...@antonakis.co.uk] > Sent: Sunday, October 17, 2010 4:10 AM > To: php-general@lists.php.net > Subject: Re: [PHP] Questions from a Newbie > > Ethan,you have the end of line semi colons enclosed in double > quotes..move them to the true end

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Christian Heinrich
Am Sonntag, den 17.10.2010, 01:00 -0400 schrieb Ethan Rosenberg: > Dear List - > > Here are some questions, which I am sure are trivial, but I am a > newbie, and cannot find the answers online > > I cannot get the following to work. In my Firefox [Iceweasel] > browser, I enter the followin

Re: [PHP] Questions from a Newbie

2010-10-17 Thread Alexis
Ethan,you have the end of line semi colons enclosed in double quotes..move them to the true end of line. On 17/10/10 04:45, Christian Heinrich wrote: Am Sonntag, den 17.10.2010, 01:00 -0400 schrieb Ethan Rosenberg: Dear List - Here are some questions, which I am sure are trivial, but I am a n