Jump to content

Odd require_once behavior


cmor

Recommended Posts

I'm requiring a php SOAP client in some of my pages.  It is below the public level of the server.

 

I'm using

require_once('../../../php/SOAP/Client.php');

 

Client.php is a part of about 7 pages that all require each other in their respective code.  Within these pages they use an interesting way to require the neighboring page. To require a page on the same directory they drop a level.  For example they use

require_once(SOAP/Values.php)

as opposed to

require_once(Values.php)

.  I haven't seen this before. 

 

Even more odd is that when I require the first page (Client.php), this way of allocating works some of the time.  It will always work for some pages with the require, and always error on others, giving the common error.

 

Warning: require_once(SOAP/Value.php) [function.require-once]: failed to open stream: No such file or directory in /home/xxxx/php/SOAP/Client.php on line 26

 

I've verified this is actually occurring in every way possible way.  I require the file in some pages and it works, others I would have to remove the extra directory.  I have no idea what is going on.  Can anyone shed some light?

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.