12-29-2007, 02:03 PM
|
#3 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
Quote:
Originally Posted by Aaron
How would I have something like this work:
$pass = include("pass.txt");
It is moi importante.
|
You have to return the output (or what you need) from that include file, just like you would in a function. Here's an example:
include.php
Code:
$x = 2+4;
return $x;
index.php:
Code:
$sum = include_once 'include.php';
echo $sum * 4; // should output 24
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|