Jump to content


Photo

Include problems - quite weird!


  • Please log in to reply
2 replies to this topic

#1 genista

genista
  • Members
  • PipPipPip
  • Advanced Member
  • 149 posts

Posted 07 July 2006 - 02:33 PM

Hi guys,

I have a join script which calls a config script. This works fine.
However the following line in the config file calling a functions include does not work (its in the same directory as the config file which is being called fine from the join form):

include ("/Supplier/supplierfunctions");

I have tried: ..htdocs/Supplier/supplierfunctions.php
                www.fulladdress.com/htdocs/Supplier/ supplierfunctions.php
                Supplier/supplierfunctions.php
and everything else in between....

But all I get is "failed to open stream: No such file or directory"

Any help would be great, as I feel so close, yet so far!!!

Thanks,


G

#2 paul2463

paul2463
  • Members
  • PipPipPip
  • Advanced Member
  • 955 posts
  • LocationUK

Posted 07 July 2006 - 02:42 PM

Hi it is quite difficult to answer without seeing the folder make ups, if they are both in the same folder i.e htdocs/supplier then the include statement should be
include ("supplierfunctions.php");
note the inclusion of the .php which your origonal include did not have

if they are in different folders i.e the calling page is not in the same folder as supplierfunctions.php you could try
include ("../Supplier/supplierfunctions.php");

see how you get on
you cannot affect the past but you can ruin a perfectly good present by worrying about the future

*********************************************************************
The <A HREF="http://www.php.net/d...php">MANUAL</A> is actually a useful resource

#3 genista

genista
  • Members
  • PipPipPip
  • Advanced Member
  • 149 posts

Posted 07 July 2006 - 02:47 PM

OK I am such a NOOB, solved.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users