Forum Moderators: mack

Message Too Old, No Replies

PHP Includes Problem

         

madcat

10:41 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For some reason, my php includes work on my local server- but when I upload to my hosts server the includes do not appear. What are some reasons for this happening? This is a large host too.

Thanks for your help!

jatar_k

10:41 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what do the paths look like? Are you getting any error messages?

madcat

10:44 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, they just don't show up?

<?php
include "inc/search.inc";
?>

<?php
include "inc/perspective.inc";
?>

Empty space?

jatar_k

10:50 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I assume the paths are right and the inc dir is within the dir that the file trying to include is in?

Are they just thml? Have you tried including a one liner that says
echo "I did it"; or something?

madcat

10:52 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, did some digging on old posts- I found I already had this problem;) Zheesh. I had to upload a .htaccess to make the server parse my .html files as php.

[edited by: madcat at 11:14 pm (utc) on Dec. 5, 2002]

jatar_k

10:53 pm on Dec 5, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you coud try absolute paths as well

include $DOCUMENT_ROOT . "/inc/search.inc";