Page 1 of 1

Displaying a PHP Include File

Posted: Fri Sep 23, 2005 4:38 pm
by pryj
This is probably a stupid question, but I have to ask it. I have a forum that I'd like to display headlines from our site which are contained in a .php include file. How do I display this file at the top of the header?

Ian

Posted: Sat Sep 24, 2005 7:34 am
by Lixas
mhmm, try include ("http://example.com/header.php"); but i'm not sure that will realy work
Or other variant- use iframe

Posted: Wed Oct 05, 2005 1:18 am
by mohumben
Well, displaying data in a php file is pure php basics. It depends on how the data is stored.
For example, let's say we have 2 files, data.php and show.php:

data.php:

Code: Select all

<?php

$header = "Welcome to my page";

?>
show.php:

Code: Select all

<?php

include 'data.php';
echo $header;

?>

Posted: Sun Oct 09, 2005 10:05 am
by D0M1N0R
Yeah that should work, BUT what exactly are you trying to do, didnt get it, or s it just as basic as showing that? why dont do that in html, and add php in the same site?

Posted: Thu Oct 13, 2005 8:44 am
by toychoq
good scripts

Posted: Thu Oct 13, 2005 6:19 pm
by Lixas
One more sollution- edit template files, but be careful, do backups and do not delete any in this, only add your own source
In template file add iframe or smth and add script in html language, because mostly templates are created in html

I think this topic should be locked, because all kind of sollution is mentioned here

-=LOCKED=-