Thanks!
From: Richard Salin (richard.salin_at_kolumbus.fi)
Date: 10/16/04
- Previous message: steve: "Looking for banner ad script"
- In reply to: Janwillem Borleffs: "Re: How do I remove PHP notice messages?"
- Next in thread: Chris Hope: "Re: How do I remove PHP notice messages?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 16 Oct 2004 18:18:02 +0300
The problem was in the php.ini file, the apace referece
to the file was invalide, and therefor it used the default
which was to display all errors including notices.
- I'd also liked to thank for the "isset" notice, I wasn't aware of the
command before this, and in my case it was
actually the command to be used.
Rez
"Janwillem Borleffs" <jw@jwscripts.com> kirjoitti viestissä
news:416ee3e3$0$41689$1b2cd167@news.euronet.nl...
> [removed alt.php.sql because my news server cannot resolve this group]
>
> Richard Salin wrote:
> > Hello!
> > I'm using the newest version of php and apache, can't remember
> > which. The problem is that it keeps giving notice messages for
> > several reasons, for example if a varible doesn't exist (when checking
> > variable!=null if the page has been displayed)
> > -My questin is, how do I get it to stop? The script work just fine,
> > except for the notices. With a older version of the apache and php
> > it worked just fine.
>
> You can do this by adjusting the error_reporting level in the php.ini
file,
> in an .htaccess file or at page level by calling the equally named
function.
>
> See the manual for details.
>
> However, notices indicate sloppy code. Instead of doing:
>
> if ($somevar == "somevalue") {
> ..
> }
>
> it's better practice to perform a proper validation, like:
>
> if (isset($somevar) && ($somevar == "somevalue")) {
> ..
> }
>
> Shure, it's more code, but you will be grateful to yourself the next time
> you need to debug your code and will be learning yourself to code at a
> higher level.
>
>
> JW
>
>
>
- Previous message: steve: "Looking for banner ad script"
- In reply to: Janwillem Borleffs: "Re: How do I remove PHP notice messages?"
- Next in thread: Chris Hope: "Re: How do I remove PHP notice messages?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|