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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:10:54+00:00 2026-05-23T19:10:54+00:00

How do I use the require_once php function in Codeigniter on a normal PHP

  • 0

How do I use the require_once php function in Codeigniter on a normal PHP file? I’, currently getting an error.

Code:

require_once($_SERVER['DOCUMENT_ROOT'].'/php/jformer.php');

Error:

Message: require_once() [function.require-once]: http:// wrapper is disabled in the server configuration by allow_url_include=0

Message: require_once(http://localhost/site/php/jformer.php) [function.require-once]: failed to open stream: no suitable wrapper could be found

  • 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-23T19:10:54+00:00Added an answer on May 23, 2026 at 7:10 pm

    You don’t use $_SERVER['DOCUMENT_ROOT'] for this, you want to use APPPATH or BASEPATH instead, or just type the full path to the file. require_once should be passed a local file, not a URL.

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

Sidebar

Related Questions

I have a section of code like the following: ---- file.php ---- require_once(mylib.php); function($a,$b)
class_1.php class class_1 { public function __construct() { require_once $_SERVER['DOCUMENT_ROOT'].'/array.php'; } } class_2.php class
I am trying to figure why I am getting this error. **Warning: require_once(\C\wamp\www\PHP with
Here is my PHP code: function SendCookieToTheMail() { require_once 'swift-mailer/lib/swift_required.php'; //Create the Transport $transport
I started to use the PHP __autoload function and now I'm getting those weird
I want to call function in PHP i use require_once for this .... now
I'm attemping to use this code to call a php file, access the database,
Everything I read about better PHP coding practices keeps saying don't use require_once because
Is it more efficient to use PHP's include_once or require_once instead of using a
Simple question. Why use require_once to include classes that you use within a file?

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.