Jump to content

[SOLVED] Need help with require_once() function


Trium918

Recommended Posts

I have three files called index.php,output_fns.php,

and php_fns.php. The php_fns contains all of the

require function that links every page to one another.

the output_fns.php contains many functions that will

be displayed different pages. The index.php just have

two functions it. One connects to the php_fns and the

other calles a function from output_fns.php.

 

The problem is that I want the data inside the output_fns.php

to display inside of the body tag when it is called by index.php.

 

Example: Click Here And view source.

 

If you just want to include something and print its data later, you can do this..

 

(From the php manual)

<?php

$foo = include 'return.php';

echo $foo; // prints 'PHP'

$bar = include 'noreturn.php';

echo $bar; // prints 1

?>

 

Otherwise... why can't you just move the include call to be within the body tags?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.