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 299351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:48:54+00:00 2026-05-12T06:48:54+00:00

By functions file I’m referring to a file that is called for in each

  • 0

By functions file I’m referring to a file that is called for in each PHP page and contains functions. I noticed another question asking about function files and it reminded me that my PHP website did not use any function file. So I’m just wondering if function files are recommended for sites.

  • 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-12T06:48:54+00:00Added an answer on May 12, 2026 at 6:48 am

    If the concept of functions is not familiar to you, they’re essentially re-usable blocks of code. If you have a bunch of functions you created, you probably want to re-use them here and there throughout your site. So what you do is collect them in one central file (or several grouped by “topic”) and include them in every page you need them.

    // In file "often_used_functions.php"
    function foo () { ... }
    function bar () { ... }
    function reticulate_splines () { ... }
    
    ---------------------------------------
    
    // In some other file:
    include "often_used_functions.php";
    
    foo();
    

    It’s all to make code re-usable.
    I.e. if you find yourself writing basically the same code again and again with only slight variations, put that code into a function and put that function into some central, re-usable file.

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

Sidebar

Related Questions

Ok, so I have a file called functions.ps1 that contains only function code: something
I have some setup code in my functions.php file that sets permalinks and adds
I've a project, with various subdirs that make use of a functions.php file located
I've got a script in my functions.php file that checks for the existence of
This question has two parts: #1 I have a functions.php that is filled with
I need to reference a particular functions.php file, that can be stored in the
I have a function in a functions.php file that defines certain variables: add_action( 'the_post',
my functions.php file is just a placeholder for many different functions. I have another
Can a function inside the functions.php file call another function from within functions.php? I'm
I have a file that corrals my re-usable functions into one file ( functions.php

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.