Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support PHP errors :S
Sheep01
Posted on 03 Jun 2008, 01:34:29

Access: Member
Total Posts: 3
Joined: 2008-06-03

page can be viewed here. Note: I switched to php5 and everything went to hell, so its running php4.

I just installed it and included this into the space where I want the news to display:

Code:
<?php
$template = "Template name";
$author = "Author name";
$cat = "Category name";
include 'http://www.sheep01.com/news/index.php';
?>

It kicked out these errors:


Code:


Warning: main(/news/index.php): failed to open stream: No such file or directory in /home/content/s/h/e/sheep01designs/html/index.php on line 68

Warning: main(/news/index.php): failed to open stream: No such file or directory in /home/content/s/h/e/sheep01designs/html/index.php on line 68

Warning: main(): Failed opening '/news/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/s/h/e/sheep01designs/html/index.php on line 68


Any Ideas?
#240
Chris
Posted on 03 Jun 2008, 01:41:40

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

When including you only need to enter

Code:
include '/news/index.php';

you don't need to enter the full URL
#241
Last edited by Chris at 2008-06-03 01:47:45 Reason:
Sheep01
Posted on 03 Jun 2008, 01:54:19

Access: Member
Total Posts: 3
Joined: 2008-06-03

Changed it to the following
Code:
<?php
$template = "Template name";
$author = "Author name";
$cat = "Category name";
include '/news/index.php';
?>



It is still happening, But I moved it up a few lines which is why its on line 52, not 68.
Code:
Warning: main(/news/index.php): failed to open stream: No such file or directory in /home/content/s/h/e/sheep01designs/html/index.php on line 52

Warning: main(/news/index.php): failed to open stream: No such file or directory in /home/content/s/h/e/sheep01designs/html/index.php on line 52

Warning: main(): Failed opening '/news/index.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/s/h/e/sheep01designs/html/index.php on line 52
#242
Chris
Posted on 03 Jun 2008, 01:56:17

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try entering the full path to the news script to see if that has any affect. Don't worry about the other lines of code, just try this on its own to see if it works.

Code:
include '/home/content/s/h/e/sheep01designs/html/news/index.php';
#243
Sheep01
Posted on 03 Jun 2008, 01:58:01

Access: Member
Total Posts: 3
Joined: 2008-06-03

That solved it! Thank you for all the help, looks like a great piece of work. :original:
#244
Last edited by Sheep01 at 2008-06-03 01:58:43 Reason:
Chris
Posted on 03 Jun 2008, 02:00:24

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Any time :happy:

I noticed the smilies aren't showing, Read this post to get them to show properly.
#245
Network-13.com © 2013