i dont even know how to title this subject.
curious how i would go about inserting data from an array file i have name array.php into my cgi. i have a set of links at the bottom, and i change one of the anchors depending on the season #summer, #fall etc... i do this from my array.php file, and it changes it everywhere on my site except my error pages. i know i could just have custom error.php files.. but i like this little simple cgi script i use (and have been for years, it logs errors and mails me the ones i want..)
my question, i show do i insert it? typically in my php pages i include it as

<?php include('array.php'); ?>

how can i call a variable

if (!$ENV{'REMOTE_HOST'}) {my @subnet_numbers = split (/\./, $ENV{'REMOTE_ADDR'});
$ENV{'REMOTE_HOST'} = gethostbyaddr(pack("C4", @subnet_numbers), 2) || $ENV{'REMOTE_ADDR'};



if ($logem{$result} eq "Y")
if ($email{$result} eq "Y")

print "Content-type: text/html\n\n";
print "$msg{$result}\n";

sub set_params

$msg{'404'} =<<__404__;
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<title>error 404 || you did a boo boo </title>


     <img src=$errorfourofour>
<table width="450px" border="0" cellpadding="18" cellspacing="0"><tr>
<td >
<div id="title">MISSING FILE: <b>$ENV{'REDIRECT_URL'}</b></div>
        <div id="contentsurrounding">
<font face=Courier New size=2>
i fear the file <b>$ENV{'REDIRECT_URL'}</b> is missing. Here is where i would like to insert the VAR! how?? tried <?=$thingsthatchange['unique_string'];?>, and ."$thingsthatchange['unique_string']".</font> 


hope i made myself clear enough.
sorry if i am confusing.


4 Years
Discussion Span
Last Post by leakbali

try to change short tag <?= with <?php echo in your script below:

<?php include('array.php'); ?>


<?php include('array.php'); ?>
<?php ehco $thingsthatchange['unique_string'];?>

It is maybe your server not supported php short tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.