Re: Creating a simple hitcounter for PHP web pages. (saves to files)



..oO(tony19760619@xxxxxxxxx)

This code will still throw at least three notices. You should fix your
error_reporting, as already suggested in alt.php.

My PHP environment is set to ignore Notices.

Really bad idea. No serious developer does this.

I tested the code, and it does work.

Notices are caused by bugs. Not severe bugs, but still bugs. And
sometimes a notice might even indicate a really big problem. Without
them you might have a hard time to find the reason for some problems.

In short: Code that throws notices is bad code.

So if you want to use it...you can.

I don't need hit counters.

I will leave the fixing up of the notices..and the other stuff
mentioned in "alt.php" to someone else.

You're offering buggy and unreliable code, which is why I responded.

If you feel up to it, you can do it..then post it back here if you
like :)

Why should I? No one needs hit counters except as a programming
exercise. You should learn how to do things properly right from the
beginning, which means to fix E_NOTICE errors and some other things.

Micha
.



Relevant Pages

  • Re: Towards a responsible vulnerability process
    ... in tremendous improvements in developer education. ... But the best example we have of code that is nearly bug-free is the ... The very best developers create few bugs, ... learn after some number of unpleasant experiences. ...
    (NT-Bugtraq)
  • Re: HEADSUP: ibcs2 and svr4 compat headed for history
    ... That includes kernel interfaces and security bugs. ... The svr4 code was apparently not written ... If we opt to have it off by default, mainstream functionality ... the hard thing to tell from a developer perspective is whether ...
    (freebsd-current)
  • Re: Why has the Metrowerks sign been taken down?
    ... > decisions that need to be made - if every developer wrote up a bug on IB ... time you figure out you can't import menus with IB, ... to wait for Apple to add that feature in response to a feature request. ... reproducible bugs that never should have even been shipped. ...
    (comp.sys.mac.programmer.codewarrior)
  • Re: TDD: Test-Driven Design or Test-Driven Development?
    ... You are allowed to cause friction on USENET - that's what it's for. ... The TDD cycle is very good at preventing bugs, and making the few that slip ... > also be mandated that every developer should document ...
    (comp.object)
  • Re: Decompiler.NET reverse engineers your CLS compliant code
    ... > entire developer community reading this thread because they are interested ... >> speech over and over about how many bugs you've reported to other ... > library or part of the framework, we adapt our implementation to avoid it ...
    (microsoft.public.dotnet.languages.vb)