Jump to content

worldofcarp

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

worldofcarp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Another option is to do something like if (@include('whatever.file')) { // was able to include file } else { // wasn't able to include file } the @ suppresses the error message if it isn't there, and it will return true or false if it was able to include the file or not.
  2. This page has some ok documentation on dates in php: http://php-date.com/
  3. The table isn't that big, so these queries shouldn't that expensive, so a little overhead but not that big a deal. Should put an index on the timestamp column. But this is strange -- it counts users more than once if they change pages rapidly. Plus DISTINCT's may be expensive. Should use count(distinct ip) at least. Or just cut out the "file" column and use count(*) which is a million times faster.
  4. That function takes seconds as an input. I think the strtotime($now) where $now=time() might be the problem -- time() returns a timestamp as an integer, strtotime() takes a string representation of a time and automagically converts it into a timestamp. If you pass time() to strtotime() I'm not sure what it will do. Just use time() instead of strtotime(time()). This page has some good documentation on what strtotime does
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.