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

  • SEARCH
  • Home
  • 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 807617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:25:45+00:00 2026-05-15T00:25:45+00:00

I have a project. It has a good number of PHP files. Each of

  • 0

I have a project. It has a good number of PHP files. Each of these files includes a standard header. They don’t include a standard footer.

Now I want to do something just before the end of every page. I can go through each page and add the footer code, but I was wondering if there is an easier way (and I think I’ve seen something like it before, though I might be mistaken).

Is there a way to set a “hook” or “trigger” function that will be executed at the end of a page, from the included header PHP script? I’m thinking of something like set_error_handler but to handle a page close event. Or like C’s atexit function.

  • 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-15T00:25:46+00:00Added an answer on May 15, 2026 at 12:25 am

    Ah, I found the function I was looking for, FINALLY. Believe me, I’ve been searching for this for a while, and just happened upon it!

    register_shutdown_function— Register a function for execution on shutdown

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

clients :has_many :project,:roles I have implement but its not a good implementation..
Say I have a project in a git repository. The project has a branch
I have a project which has some lib's associated with it (in Build Path).
I have a project that has several build configurations (FREE version, male-only, female-only, etc.).
I have a project which has a set of binary dependencies (assembly dlls for
I have a project which has shared functionality between three other projects and have
I have a project that has a GUI (written in QT) and a command-line
I have a project that has components in several different directories and would like
I have one project which has RIAService with entity framework that is referenced to
We have a project that has been built in Flash and as3. It is

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.