boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

php include trouble

 
Post new topic   Reply to topic    boardom Forum Index -> PHP help
View previous topic :: View next topic  
Author Message
tvtoday



Joined: 10 Jun 2003
Posts: 6

PostPosted: Wed Jul 16, 2003 10:09 pm    Post subject: php include trouble Reply with quote

My site is http://www.tvtoday.co.uk/

I thought that the PHP include function could be used just like an SSI.

So I dropped the following line of code into my index.php:

<?php include("http://www.tvtoday.co.uk/notes.php") ?>

(nb there's nothing wrong with notes.php, it works fine).

And got this error message:

Warning: Failed opening 'http://www.tvtoday.co.uk/notes.php' for inclusion (include_path='') in /home/t/v/tvtoday/public_html/index.php on line 41

What have I done wrong? Do I need to CHMOD notes.php?

thanks
Nick
Back to top
View user's profile Send private message
.Chris



Joined: 30 Apr 2002
Posts: 186
Location: Hawaii

PostPosted: Wed Jul 16, 2003 10:17 pm    Post subject: Reply with quote

Try
Code:
<?php include("/home/t/v/tvtoday/public_html/notes.php") ?>
or
<?php include("notes.php") ?>

_________________
this is my clone.
Back to top
View user's profile Send private message Visit poster's website
tvtoday



Joined: 10 Jun 2003
Posts: 6

PostPosted: Wed Jul 16, 2003 10:22 pm    Post subject: Reply with quote

Tried both, neither work.

Nick
Back to top
View user's profile Send private message
.Chris



Joined: 30 Apr 2002
Posts: 186
Location: Hawaii

PostPosted: Wed Jul 16, 2003 11:02 pm    Post subject: Reply with quote

ok how about
Code:
<?php include '/home/t/v/tvtoday/public_html/notes.php' ?>
or
<?php include 'notes.php' ?>
Or just ignore me and what for someone experienced to help Smile
_________________
this is my clone.
Back to top
View user's profile Send private message Visit poster's website
tvtoday



Joined: 10 Jun 2003
Posts: 6

PostPosted: Wed Jul 16, 2003 11:52 pm    Post subject: Reply with quote

With a bit of tinkering I've determined that the problem is more complicated than I initially suggest.

There's nothing wrong with the php command I have used.

This is what I'm trying to do:

I want to have a 'thought-stream' category and I want to have it running down a column, separate from my other posts.

So I have excluded category 13 (the thought-stream) from the general list, and written a php file to show only category 13 - that's what notes.php.

The problem, I think, is to do with the way the mySQL database works, and the loop.

I think that the answer lies in editing variables within the notes.php file - the best I have got so far is this:

<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; $cat="13"; include ("blog.header.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<!-- // b2 loop start -->
<?php { start_b2(); ?>

<b><?php the_title(); ?></b>
<br><?php the_content("","1","") ?>
<br><i><b><?php the_date("jS F") ?>, <?php the_time("hh:mm"); ?></i>

<!-- // this is just the end of the motor - don't touch that line either Smile -->
<?php } ?>

As you can see, I have excluded the 'while' command, etc, from the start_b2() line - the result of this is that the file produces a comma and some whitespace.

Aaaaaargh.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> PHP help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group