Jump to content

bradleyjx

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

About bradleyjx

  • Birthday 01/25/1987

Contact Methods

  • AIM
    bradleyj12
  • MSN
    akromajx@hotmail.com
  • Website URL
    http://www.jxproductions.info/
  • Yahoo
    bradleyjx

Profile Information

  • Gender
    Male
  • Location
    Fuedal Japan

bradleyjx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. @akitchen: I've tried almost every iteration of using single and double quotes, as well as preceding the path with "/" and trying to use the path as if "../" went to the server root rather than up one directory. Let me clarify what's happening (after some more testing and figuring out why some things work and some don't): Here's the directory I'm using to test this: /a/ /a/foo /a/foo/bar /a/foo/baz /a/one/two Each folder contains a php file with the same name as the folder it is contained in. (so the file in /foo/bar is called bar.php) In addition, there is an index.php file located in /foo/bar Now, the following two include statements work from index.php... [code]include('bar.php');[/code] [code]include('../foo.php');[/code] In addition, the following two include statements work as well. (they have very unneccessary code, but they show that things that don't work later seem to work in these special cases)... [code]include('../bar/bar.php');[/code] [code]include('../../foo/bar/bar.php');[/code] ...and none of the following statements work from index.php... [code]include('../bar/bar.php');[/code] [code]include('../../a.php');[/code] [code]include('../../one/one.php');[/code] [code]include('../../one/two/two.php');[/code] Any ideas?
  2. Alright, I'm building a PHP web mini-app that I need to have able to be moved around in such a way that I am forced to use relative paths for almost everything. I am having issues with using these paths and getting them to work. Example: (simplified to handle the specific problem I'm having) I have two files that I want to connect via an include statement. One is in /foo/bar/file.php, while the other is in /include/header.php. So, I'm using the following script in file.php to include header.php: [code] <?php     include('../../include/header.php'); ?> [/code] I've found that the problem I'm having has to do with the "../", either by me doing something that isn't right or by some other reason. So, my question is whether or not that include statement is doing anything that I'm not expecting it to do? If it is written the way it's supposed to, what could be wrong, as in my code the file does not get included into the web page.
×
×
  • 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.