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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:52:22+00:00 2026-05-23T03:52:22+00:00

I wonder if I need to use .php for the php snippet files I

  • 0

I wonder if I need to use “.php” for the php snippet files I must include in my principal page with include_once(...). When included in my code those snippets are handled as php instructions I guess so, then can we avoid the extension (snippets are in a folder named ‘php’ so no confusions).

Anyway isn’t that going to make serious disturbances within my code ?

  • 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-23T03:52:22+00:00Added an answer on May 23, 2026 at 3:52 am

    No, you don’t need to use “.php” extension for “include_once()” or “include()”. You may use any extension like may be .txt or .inc. The point to note that any PHP code in the included file is enclosed in the PHP tag, otherwise it will be treated as HTML.

    Another point to consider is to not keep sensitive information in the included files (mainly if you choose to give them a non-.php extension) to prevent them being accessed on the browser. Or keep those files outside your document root.

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

Sidebar

Related Questions

i wonder what does @ means when we use it before include or require
I was wonder about the proper usage of ManualWorkflowSchedulerService.RunWorkflow(). Do I need to synchronize
I need to run a php script as daemon process (wait for instructions and
I am facing some problems converting the PHP SQL insertion code below to ASP,
The situation is next: I have php file, which parses a web-page. on that
is there any solution to this problem i use : $this->type('contentform', 'i need to
I think HipHop for PHP is an interesting tool. It essentially converts PHP code
I need to use an event system in C++. I have mainly four requirements
I'm using a library which returns a reference to me. I need to use
As long as I can remember, whenever I use a module I include a

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.