Re: Re: cvs: php4 /ext/standard file.c
| From: | Sara Golemon | Date: | Tue, 08 Apr 2003 17:56:41 +0000 |
| Subject: | Re: Re: cvs: php4 /ext/standard file.c | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-796@lists.php.net to get a copy of this message | ||
Excellent point... I should've known you'd be a step ahead of me....
Probably best to leave it out then, at least until users get used to the
concept of contexts.
-Pollita
"Wez Furlong" <wez@thebrainroom.com> wrote in message
news:Pine.LNX.4.53.0304081756340.13015@zaneeb.brainnet.i...
> I've considered this a few times; the thing that has stopped me from
> implementing it so far is that I'm not 100% sure if this is a good thing
> as it would become very much like having ini settings for each context
> option.
>
> This is something that *could* cause problems; if a pear class assumes
> the default has no special options set and then tries to open a file, it
> might possibly fail because some settings are turned on.
>
> I like the idea, I'm just not sure if I like the potential headache :/
>
> --Wez.
>
> On Tue, 8 Apr 2003 pollita@php.net wrote:
>
> > There is one thing I wanted to discuss in that regard though... What do
you
> > think of a "default context"?
> >
> > <?php
> > $opts = array(array(....));
> > $context = stream_context_create($opts);
> > stream_context_default($context);
> >
> > /* All stream related functions [fopen, file_get_contents, readfile,
file,
> > file_put_contents, etc...] will now use $context by default unless
> > explicitly overridden */
> > .....
> > .....
> > ?>