| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Dern Include Files... | |
|---|---|
| Tweet Topic Started: Nov 21 2007, 04:22 PM (739 Views) | |
| Midnight Umbreon | Nov 21 2007, 04:22 PM Post #1 |
|
Member
![]() ![]() ![]() ![]()
|
http://www.tmu.lilting.org/ Any page other than the forums and the index isn't working. The only way I got the index to work is by taking off the URL and just having include/left.php. But I can't do that for the rest of them because they are in different directories. Any ideas? BTW, here's the index source code.
|
![]() |
|
| Dennis | Nov 21 2007, 04:36 PM Post #2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
What is the source code of contactme.php? Or affiliate.php. Any page other than index.php |
![]() |
|
| Midnight Umbreon | Nov 21 2007, 05:12 PM Post #3 |
|
Member
![]() ![]() ![]() ![]()
|
It's the same as the index except with different body text. |
![]() |
|
| Dennis | Nov 21 2007, 05:32 PM Post #4 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Oh, I see the problem. You can't call a remote address via include. You're using
You should be using the server's absolute path to your include file:
A relative path will work as well:
|
![]() |
|
| Midnight Umbreon | Nov 21 2007, 06:07 PM Post #5 |
|
Member
![]() ![]() ![]() ![]()
|
Hmm.. It worked before.. Thanks.. I'll try it... |
![]() |
|
| Dennis | Nov 21 2007, 07:28 PM Post #6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If you recently switched hosts, that may be why. I believe it is possible for it to be enabled, but most hosts have it disabled for security purposes. I've never heard of include() working remotely before. |
![]() |
|
| Midnight Umbreon | Nov 21 2007, 07:54 PM Post #7 |
|
Member
![]() ![]() ![]() ![]()
|
#### it.. So I can't put http://www.lilting.org/home/lilting/public...nclude/left.php? Just home/lilting/public_html/tmu/include/left.php? |
![]() |
|
| FearKiller | Nov 21 2007, 08:39 PM Post #8 |
|
www.drewscripts.com
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
This code will work best for you.
It is what I use at www.FearKiller.net to include the random quotes text at the top of every page. How it works is a for() loop runs through the URL of the current page counting how many directories up from the root directory. All you have to do is edit the text "php-inc/quotes.txt" to accommodate the proper path of the file you are including. Do so as if you were including the file from your web site's root directory. Reply if you have any problems I can assist you with. |
![]() |
|
| Midnight Umbreon | Nov 21 2007, 10:33 PM Post #9 |
|
Member
![]() ![]() ![]() ![]()
|
Thanks alot, Fearkiller but I've got it to work. Thanks anyway. |
![]() |
|
| blakeo_x | Nov 27 2007, 02:55 AM Post #10 |
![]()
I cant believe its not PHP!
![]() ![]() ![]() ![]() ![]()
|
Include function URL fopen wrappers (allow_url_fopen and allow_url_include) must be enabled. Like you said, most hosts do have it disabled for security reasons because of the ablility to access remote objects, but run them within a local environment. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
4:57 AM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)




4:57 AM Jul 11