Jump to content

benmay.org

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

benmay.org's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. This part of an application has been driving me round in circles for AGES... Starting to loose it Basically, I pull from DB a date of when something happened.. I need to establish if that date is or over 30 days ago... Here is what I have but results keep fluctuating and I don't think it's correct.. $StoredDate = "$year-$month-$date"; $StoredDate = strtotime($StoredDate); $nowDate = date("Y-m-d"); $shift = "-30 days"; $CompareDate = sql_date_shift($nowDate, $shift); $CompareDate = strtotime($CompareDate); if($CompareDate > $StoredDate) { $RequireModule = true; } //// Functions function sql_date_shift($date, $shift) { return date("Y-m-d H:i:s" , strtotime($shift, strtotime($date))); }
  2. It is probably because, when you're adding a new menu item to the web page, its blowing the existing templates sizes up. And putting stuff all over the place
  3. That got it!! Thanks, and thanks for the promt (within 5 mins) Reply!
  4. Hey, Here's the situation, I have a website with a template in /templates/boringtemplate/template.php the template file is html with <?php echo($title) ?> along the way, normally, to display it dynamically, I just run all the queries, and include("templates/$templatedir/template.php") and it works great, But, I am getting to the stage where my little cms cant be used by some clients due to them not having mysql etc.. I'm trying to figure out how I can generate a static page.. Here is what I've started on.. [code] $filename ="static_$current_page.html"; $myFile= fopen($filename,'a'); if(! $myFile){ print ("File could not be opened."); exit;} fputs($myFile, $string); fclose($myFile); [/code] Thats fine, it will write $string to the desired html file. But.. How Can I get the string to include the answers the the php. In other words, I think I need to execute the php file, and save the result as a html file...
×
×
  • 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.