>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Be cautious while using this.
$mth = 1;
$pay_date = "2010-01-31";
$end_date = date('m-d-Y',strtotime("$pay_date + $mth months"));
echo $end_date; //03-03-2010, will take you to March
Thanks,
Anshul
On Wed, Mar 31, 2010 at 1:12 AM, Nathan Rixham wrote:
> Anshul Agrawal wrote:
> > On Tue, Mar 30, 2010 at 8:41 PM, Jan G.B.
> wrote:
> >
> >> 2010/3/30 Nathan Rixham :
> >>> Jan G.B. wrote:
> >>>> 2010/3/29 Nathan Rixham
> >
hat process will not release the memory while it's serving another
> 1000
> >>>> requests for `clear.gif` which is maybe 850b in size.
> >>> again everything depends on how you have your server configured; you
> can
> >>> easily tell apache to kill each child after one run or a whole host of
> >>> other configs; but ultimately if you can avoid opening up that file in
> >>> php then do; serving statically as above is the cleanest quickest way
> to
> >>> do it (other than using s3 or similar).
> >>>
> >>> regards!
> >>>
> >>
> >> Sure, you could configure your apache like that. Unless you have some
> >> traffic on your site, because the time intensive thing for apache is to
> >> spawn new processes. So it's just not a good idea to do that, Nor to
> serve
> >> big files via file_get_contents.
> >
> > was only addressing and issue you pointed out.. anyways.. so you propose
> > what exactly? don't server via apache, don't use file_get_contents
> > instead do..?
> >
> > ps you do realise that virtually every "huge" file on the net is served
> > via a web server w/o problems yeah?
> >
> >
>
> I was recommending other file methods like fopen() combinations,
> fpassthru() and at best readfile(). All of them do not buffer the
> whole file in memory.
>
> http://php.net/readfile
> http://php.net/fpassthru
>
> Regards
>
>
>
--
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
I wanted to see the diff between the memory usage of following three methods
in PHP.
1. readfile
2. fopen followed by fpassthru, and
3. file_get_contents
Using xdebug trace, all three of them gave same number. With
memory_get_peak_usage(true) file_get_contents took double the space. (file
being tested was mere 4mb in size)
Unable to decide what is the best way to profile such methods. Can anybody
suggest?
Thanks,
Anshul
d security then why have php involved at all? simply
> symlink to the directory or expose it via http and be done with the
> problem in a minute or two.
>
> Regards!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Also look at readfile() and fpassthru if dealing with large files.
Moreover, if you have control over the webserver then you can use PHP only
for authenticating the getFile request and offload the file delivery
operation to your webserver (Apache, NginX, lighttpd) using "X-SendFile"
header in the response.
Best,
Anshul
On Mon, Mar 29, 2010 at 5:30 PM, Jan G.B. wrote:
>
> 2010/3/29 Anshul Agrawal
>
> There is something new based on Trac but written in PHP.
>>
>> mtrack (http://bitbucket.org/wez/mtrack/wiki/Home)
>>
>> It is written by one of the PHP Core Developers (Wez Fu
There is something new based on Trac but written in PHP.
mtrack (http://bitbucket.org/wez/mtrack/wiki/Home)
It is written by one of the PHP Core Developers (Wez Furlong). May be you
want to try it out.
Best,
Anshul
On Sun, Mar 28, 2010 at 10:36 PM, Nathan Rixham wrote:
> shiplu wrote:
&g
Please Unsubscribe me
I don't wanna recieve many e-mails to my inbox.
- Original Message -
From: "anshul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, July 06, 2005 11:22 AM
Subject: Unsubscribe me
> Please Unsubscribe me
> I do
Please Unsubscribe me
I don't wanna recieve many e-mails to inbox
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yes. use file_get_contents() to get it and then dump it.
But this makes your db bulky and is not recommended.
PDF is generated runtime using PHP, see fpdf so.
Use file
- Original Message -
From: "Bagus Nugroho" <[EMAIL PROTECTED]>
To: "php-general"
Sent: Friday, July 01, 2005 9:23 AM
S
Please unsubscribe me.
I don't wanna recieve many e-mails to inbox.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
We've our new Technology Forums started from India.
http://forums.mediasworks.com/
I invite you all to join our community.
http://forums.mediasworks.com/
Thanks & regards.
This mail is not a SPAM or solicitation badly.
This is a one-time notification news.
You won't recieve this messag
This script lists all files/directories in '.' directory. I wanna pass some
querystring with anchor around directories listed, so that if a user clicks
a directory-link, all the files in it are listed. How? Please help.
";
echo "Directories:";
while (false !== ($file = readdir($handle))) {
if(is
12 matches
Mail list logo