title says it all. I try to include a file in same directory as the file that calls it by referencing it like this:

include ("messages.php");

and get this error:

Warning: printmessage() [function.printmessage]: Failed opening 'messages.php' for inclusion (include_path='') in /home/glassmir/public_html/site/includes/fewfunctions.php on line 103

driving me crazy... works on my home development server but not on my co-lo live box (the one that matters!)

any thoughts?

    check the "includes" file path in php.ini

    note that nix directory paths and windows directory paths are not the same. Also remember that on nix machines case will matter!

      I got around this error by using the full address:

      include ("http://www.yourdomain.net/yourdirectory/messages.php");

      I hope there's a better way, but it worked for me! Hope it helps.

      Carol

        yes, but it is rather poor coding to put the full URL in the string, instead, when I have to do that, I include techvariables.php which indeed has those variables in it. Then if i need to i can use premade string like pathtovars = "$path$folder" or stuff like that, it was all working fine until i uploaded to my live server...

          Yes, well, I'm not sure I understood all that, but I get your drift
          (that it didn't help you at all). I am aware that it is bad coding practice, but until I control my own server or find another way, it is all that will work for me. 🙁

            Write a Reply...