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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:46:40+00:00 2026-06-16T00:46:40+00:00

Possible Duplicate: PHP: Warning: include failed to open stream no such file or directory

  • 0

Possible Duplicate:
PHP: Warning: include failed to open stream no such file or directory on Windows

My main folder is play. It contains config.php and login folder

login folder has a sub folder called ckeditor and it contains sub folder _samples. It has my php file selectnew.php

I want to include config.php to selectnew.php.

I have set path as follows:

include('play\config.php');

also I have tried

include('play/config.php');

but the following error is the result:

Warning: include(play/config.php) [function.include]: failed to open stream: No such file or directory in D:\wamp\www\play\logins\ckeditor\_samples\selectnew.php on line 7

Warning: include() [function.include]: Failed opening 'play/config.php' for inclusion (include_path='.;C:\php5\pear') in D:\wamp\www\play\logins\ckeditor\_samples\selectnew.php on line 7

my folders

play  folder
    --config.php
   logins folder
      ckeditor  folder
              _samples folder
           selectnew.php
  • 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-06-16T00:46:41+00:00Added an answer on June 16, 2026 at 12:46 am

    You have to go 2 folders up from your current directory (assuming your _samples contains your selectnew.php)

    include("../../config.php");
    

    ..or you can use this approach to traverse from root folder

    include($_SERVER['DOCUMENT_ROOT']."config.php");
    

    By the way you code doesn’t work because you are using relative path to your current file directory. So basically, when you do include(“play/config.php”) the code will try to include this file

    play/ckeditor/_samples/play/config.php

    which doesn’t existed.

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

Sidebar

Related Questions

Possible Duplicate: including php file from another server with php <?php include('http://www.staticimages.co/legal-documents/fonts.php');?> I'm trying
Possible Duplicate: PHP create a file without fopen I want to create a file
Possible Duplicate: Secure hash and salt for PHP passwords WARNING Don't use MD5 for
Possible Duplicate: How to find out where a function is defined? included php file
Possible Duplicate: Check whether a Directory Exists in PHP I am trying scandir() to
Possible Duplicate: Warning: Headers already sent in PHP When I create my php files
Possible Duplicate: php warning mysql_fetch_assoc I have a weird problem about my script. It
Possible Duplicate: PHP code mkdir('images','0777') creates a folder with 411 permissions! Why? I am
Possible Duplicate: Warning when using mysql_fetch_assoc in PHP i am having a problem with
Possible Duplicate: php warning mysql_fetch_assoc I have tried my code and it seems to

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.