Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7023423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:42:33+00:00 2026-05-27T23:42:33+00:00

I am making a section for website, with changeable info from admin panel, but

  • 0

I am making a section for website, with changeable info from admin panel, but the info won’t change so much, so the section shouldn’t be dynamic. I’m intended to generate html on info change, but to store all the html in one variable with "" it gets messy. So maybe there is another way to do this, so its more maintainable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:42:34+00:00Added an answer on May 27, 2026 at 11:42 pm

    Just cache the site in a way that the cache will be hit first:

    <?php
    ob_start();
    ?>
    <html>
    ...
    Build your page dynamically as usual.
    ...
    </html>
    <?php
    
    $site = ob_get_contents();
    file_put_contents('webroot/site.html', $site);
    ob_end_flush();
    

    This builds a regular dynamic HTML/PHP page and writes that page into an .html file in the webroot, which will be hit directly the next time. In your admin interface you just need to delete this cached version whenever you update the information. The above script is invoked only if the .html version does not exist through .htaccess rewrite rules, e.g.:

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)\.html$ $1.php [QSA,L]
    </IfModule>
    

    So the logic works like this:

    • admin updates contents in admin panel which are saved somewhere
    • user visits site, no cached .html page exists, rewriting invokes the above PHP script
    • the script creates the .html file and serves the page dynamically once
    • the next user visits the site, gets the cached .html version
    • admin updates contents in admin panel, cached site is deleted
    • rinse, repeat
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a form (html & php) which is part of an admin section
We have a custom CMS on a football website. Within the CMS admin panel
How do I go about making an image or section of the page full
I've been tasked with making our help section open in a new window which
I am trying to send an outlook appointment from an ASP.NET website. I have
I am working on making a custom section of my app.config and web.config to
I'm reading through the Source Making site, specifically the Refactoring section. On the page
I am trying to add a tell a friend section to a website I
i have provided a button to change theme of website.in onclick event handler of
Recently making the switch from Prototype to jQuery , I am struggling with some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.