Include not working...
Moderator: General Moderators
Include not working...
OK on my site i have a new type of news thing and its in a directory called forums. Now i put this on my main page:
<? include ("/usr/local/etc/httpd/dale.unrealism.com/forums/PluhNews.php"); ?>
but is that wrong? Cuz then when i view the page its blank.
<? include ("/usr/local/etc/httpd/dale.unrealism.com/forums/PluhNews.php"); ?>
but is that wrong? Cuz then when i view the page its blank.
Dale, I am not sure, what do you mean by your 'main page'?
If it is your web page, you should make the path relative to your html doc, something like
and leave out the (), but I might be wrong since I don't know what you try to accomplish.
If it is your web page, you should make the path relative to your html doc, something like
Code: Select all
<?php include '/forums/PluhNews.php'; ?>I've tried opening
http://www.imahosting.com/dale/forums/PluhNews.php
and there seems to be no page there!
What is the actual url of the forum?
http://www.imahosting.com/dale/forums/PluhNews.php
and there seems to be no page there!
What is the actual url of the forum?
Martin if you look in the INCLUDE PATH error..:
/usr/local/etc/httpd/dale.unrealism.com/index.php
I know its not obvious but the url to my forum is:
http://dale.unrealism.com/forums/
My Main Page:
http://dale.unrealism.com
/usr/local/etc/httpd/dale.unrealism.com/index.php
I know its not obvious but the url to my forum is:
http://dale.unrealism.com/forums/
My Main Page:
http://dale.unrealism.com
Tell me is there still a problem, the forum is up and riunning on your site as far as I can see. If not: did you try modifications on
like
or
what type server is it running on?
Code: Select all
<?php include '/forums/PluhNews.php'; ?>Code: Select all
<?php include './forums/PluhNews.php'; ?>Code: Select all
<?php include 'forums/PluhNews.php'; ?>Not much help, aren't we ?;-)
Ok, I don't have the answer but
1) Did you check the include path in your PHP infoDoes it point to the proper drive/directory or is there some weird reference which should be corrected. You can correct this in the php.ini
2) once in the directory where you are calling the PHP script, echo the path infothat should be the proper position from the root of your website dir to the current directory. Copy this path in your include statement.
3) copy the script to the directory where you need it. In some settings the php file should be in the the same directory, depends on the configuration and/or sysadministrator.
Ok, I don't have the answer but
1) Did you check the include path in your PHP info
Code: Select all
<?php phpinfo(); ?>2) once in the directory where you are calling the PHP script, echo the path info
Code: Select all
<?php echo $PATH_INFO; ?>3) copy the script to the directory where you need it. In some settings the php file should be in the the same directory, depends on the configuration and/or sysadministrator.
What about
and
HTH
Code: Select all
<?php include './PluhNews.php'; ?>Code: Select all
<?php include '../forums/PluhNews.php'; ?>