relative paths and get variables

This is a discussion on relative paths and get variables within the PHP General forums, part of the PHP Programming Forums category; Hi I am currently developing a site and I came across a weird behaviour which I just cannot understand: The ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-21-2004
Carolina
 
Posts: n/a
Default relative paths and get variables

Hi

I am currently developing a site and I came across a weird behaviour
which I just cannot understand:

The whole thing was working and I could include files from other
directories using relative paths with or without passing variables and
whatever the method.

I implemented a cookie. It would not work unless I used ob_start( ); (I
am still not sure why - anyway)

Now the cookie works but I get the following puzzling error:
Say I am checking something and if it's wrong, I want to display an
error message. I use a nice error file:
include("../error.php");
This works except I want to tell it which error to print so I use
include("../error/error.php?error=access");
for example. And this does not work anymore but produces the error:
Warning: main(): Failed opening '../errors/error.php?error=access' for
inclusion (include_path='.:/usr/lib/php') in ...blah.

I could get around it having a separate file for each error but that's
not the point, now is it?.... :) And I need to pass variables to other
files too anyway!

I have checked my php.ini settings and the pwd is included so I should
have no problems with relative paths.

It looks like the argument to the php file (?error=access) is
interpreted as part of the filename but why would that not happen before
I used a cookie? What would a set_cookie and ob_start have to do with
apache/zend's interpretation of a filenames?

Any help would be greatly appreciated as I'd rather understand what's
going on than just dropping the problem... :)


Thanks a lot!


C
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:22 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0