Jump to content

file path question


phporcaffeine

Recommended Posts

***SYS SPECS***
Apache 2.2.3
PHP 5.2
Win XP Pro
Has Access to PHP.INI
Has Access to httpd.conf
*******************

here is a sample folder tree that I have

/root
|> folder_1
       |> file_1.php
|> file_2.php

I want to 'require()' file_2.php FROM file_1.php.  Why can't I use [code]require('../file_2.php');[/code] in file_1.php?

If it can be done that way, could someone show me how?  I have been playing with include_path in the .INI all day and I have yet to figure it out.

If you have a better solution, I'm up for that as well. 

My basic objective is to be able recursivly 'require' / 'include' files without having to enter the full file/url path.

TIA
Link to comment
Share on other sites

here is the error:

Warning: require(../ktrack_inclusion.php) [function.require]: failed to open stream: No such file or directory in F:\Apache2\htdocs\modules\ktrack\library\inc\headers\header.global.php on line 5

The file 'ktrack_inclusion.php' exists in: F:\Apache2\htdocs\modules\ktrack\library\inc
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.