|
Posted by howa on 11/24/06 15:37
Erwin Moller 寫道:
> howa wrote:
>
> >
> > Erwin Moller ???
> >
> >> howa wrote:
> >>
> >> > ini_set( "short_open_tag", 1 );
> >> >
> >> > phpinfo();
> >> >
> >> > still showing 'off'
> >>
> >> Hi,
> >>
> >> ini_set() doesn't change the settings in php.ini.
> >> It just (tries) to overwrite some value in php.ini for the duration of
> >> the script that contains that ini_set().
> >>
> >
> > well, how do I know which value in php.ini can be changed, and which
> > not?
> >
> > seems can't find on the php.com
>
> Look again?
>
> http://nl3.php.net/manual/en/ini.php#ini.list
>
> Pay attention to the column named 'changable'.
>
> And always test.
> If you change some ini value, simply check inyour srcipt if it changed
> succesfully.
>
> It is considered (by me) good programming practice to have a file included
> above all scripts (or at least the entrypoints of your site).
> In this file you check a few thing that are important to the functioning of
> your application.
> Eg: are magic quotes on? Can you change the include-directory? etc.
> Fail if some assumptions are not met with a clear complaint (eg: This
> application needs mysqli to run, not mysql! mysqli not found.).
>
> This has the advantage that when you change ISP or update your server, or
> change to a newer version of PHP, your scripts will fail with a clear
> complaint instead of failing in unpredicted ways.
> Note: Some of these settings can NOT be changed when running in save mode.
>
> Regards,
> Erwin Moller
Thanks.
Navigation:
[Reply to this message]
|