Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Include wont work from home directory
Old 07-29-2004, 01:41 PM Include wont work from home directory
Experienced Talker

Posts: 31
Trades: 0
I can include a config file from any directory within my site except from the home directory. I have tried it with the config file in the same directoy and in other directories (updating the path as and when).
NO JOY.
I have an htaccess file but it only contains mod rewrites and 301's so I dont see how this could affect it. From the errors I get it seems that no matter where I store the file it never seems to be found.
Here is the error...
Warning: main(/widget/config.php) [function.main]: failed to create stream: No such file or directory in /web/_u/_r/_b/mysite.com/public/www/template.php on line 129

Any ideas would be greatly appreciated.
urbanite is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-29-2004, 03:39 PM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,536
Location: Western Maryland
Trades: 0
urbanite,

Are both the file performing the include and the file to be included in the same (Home) directory?

Also, could you post the code snippet where you perform the include. It may seem trivial, but it helps to see.

Hopefully we can get this solved for you in short order.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-02-2004, 09:12 AM
Experienced Talker

Posts: 31
Trades: 0
Sorry i didnt even noticed this thread had been replied too.
I have actually solved the problem now.
I was advised to use put the following into my include, just before the file name.

include($_SERVER["DOCUMENT_ROOT"]

Did the trick.
Thanks anyway though.
urbanite is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Include wont work from home directory
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11782 seconds with 12 queries