Welcome to Dream.In.Code
Become a PHP Expert!

Join 136,916 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,739 people online right now. Registration is fast and FREE... Join Now!




Include error

 
Reply to this topicStart new topic

Include error

sushy
24 Mar, 2008 - 03:46 AM
Post #1

New D.I.C Head
*

Joined: 11 Oct, 2005
Posts: 20


My Contributions
I have an include on this page, but it does not work.
it is like:
CODE
<?php include('file.txt'); ?>


It gives this error:

Warning: main() [function.main]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/schaik2/domains/modobase.nl/public_html/english/links.php on line 1

Warning: main(http://modobase.nl/deelcode3.txt) [function.main]: failed to open stream: Connection timed out in /home/schaik2/domains/modobase.nl/public_html/english/links.php on line 1

Warning: main() [function.main]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/schaik2/domains/modobase.nl/public_html/english/links.php on line 1

Warning: main(http://modobase.nl/deelcode3.txt) [function.main]: failed to open stream: Connection timed out in /home/schaik2/domains/modobase.nl/public_html/english/links.php on line 1

Warning: main() [function.include]: Failed opening 'http://modobase.nl/deelcode3.txt' for inclusion (include_path='.:/usr/local/lib/php') in /home/schaik2/domains/modobase.nl/public_html/english/links.php on line 1

Does anyone know how to fix this?
User is offlineProfile CardPM
+Quote Post

spearfish
RE: Include Error
24 Mar, 2008 - 07:55 AM
Post #2

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 2 times
Dream Kudos: 225
My Contributions
First.... is the file located in the right place? That should be a preliminary check.

Then you need to check out your website configuration.... is it set up to parse .txt files? If not, that would be your problem.
User is offlineProfile CardPM
+Quote Post

wd7.rodrigo
RE: Include Error
25 Mar, 2008 - 06:08 AM
Post #3

New D.I.C Head
*

Joined: 24 Mar, 2008
Posts: 6


My Contributions
Try this way:
<?
if(file_exists("file.txt")){
require("file.txt");
}
else{
echo "File Not Found";
}
?>
User is offlineProfile CardPM
+Quote Post

spearfish
RE: Include Error
25 Mar, 2008 - 09:17 AM
Post #4

Monkey in Training
Group Icon

Joined: 10 Mar, 2008
Posts: 746



Thanked: 2 times
Dream Kudos: 225
My Contributions
That should diagnose the problem and let you know if you're configured to parse .txt 's icon_up.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 10:06PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month