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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:16:20+00:00 2026-05-25T16:16:20+00:00

On my localhost, I tinker with php.ini to set the include_path. But, overtime the

  • 0

On my localhost, I tinker with php.ini to set the include_path. But, overtime the line for the include_path in my php.ini has grown and it looks, ummm, unsightly. I’m looking for a way to set include_path like, I can copy-paste a single include line, say <?php include("superfile.php");?> on all pages, regardless of where they are in the directory tree, where superfile contains all include_path directives.

I’ve already tried,

<?php
    $include_path = $_SERVER["DOCUMENT_ROOT"] . "/more/directories/as/needed/";
    ini_set("include_path", $include_path);
    include("initialize.php");
?>

and saved it on the root folder as superfile.php. However if I want to set the include path of a file residing at, say root/sub, by way of superfile.php I need to do <?php include("../superfile.php"); ?> (with “directory up” dots), defeating my purpose of setting the include_path.

Any suggestions? Thanks!

  • 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-25T16:16:21+00:00Added an answer on May 25, 2026 at 4:16 pm

    It sounds like you’ve removed all of your custom include_path directives from the php.ini.

    To allow all scripts to call <?php include("superfile.php");?> simply add the one entry to your php.ini include_path that will allow this, and your set.

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

Sidebar

Related Questions

Aside from the obvious (localhost, 127.0.0.1) does PHP (command line interface!) have a mechanism
[root@localhost \]# php -i | grep Configuration Configuration File (php.ini) Path => /usr/local/lib Loaded
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
It works perfectly on localhost with Xampp, but when I try it on my
80765 | localhost | Query | 135 | Locked | UPDATE pligg_links set link_summary='',
http://localhost/test/editformquestions.php#?formid=1 And http://localhost/test/editformquestions.php?formid=1 I failed to retrieve $_GET['formid'] in the first one,why? The content
//$GLOBAL_includesPath = http://localhost/smthing/; <? include_once $GLOBAL_includesPath.'global_menu.php'; ?> error: Warning: include_once() [function.include-once]: http:// wrapper is
I use the RedisConnection Set method to set the byte array but how do
http://localhost/allsides/.htaccess RewriteRule (.*) index.php?$1 [L] http://localhost/allsides/test One or more chars after allsides/ are saved
$con = mysql_connect(localhost:.$LOCAL_DB_PORT, $LOCAL_DB_USER, $LOCAL_DB_PASS); mysql_select_db(hr, $con); mysql_query(set names utf8, $con); while(true) { do_stuff($con);

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.