OK, I have a script which reads from a database, displays some Data. The Display section loops through three times (Or as many as necessary)
For each loop, an external text file needs to be included which is basically a list of variables. This file is Dynamically selected based on the record being displayed in the loop.
Now for the problem. When I try to "Include" the text file, it is being interpreted as a string, and not a variable. How can I make this file be read as a string.
Below is the current format of the file I need to include. This is not a Script, just a list of variables and their assignments.
$cpanelpro_support="1";
$cpanelpro_images="1";
$videotut="1";
$ror="0";
$updatecontact="1";
$modules-php-pear="0";
$modules-perl="0";
Here is a condensed version of the script I am trying to add these variables to.
<?php
//opens the initial table and <TR>
echo '<table border="1" align="center" class="plandet">'."\n".'<tr>';
// My Real escape string, database select and build array all goes here and is working.
do { //start the loop section
//Followed by some calculations to determine how to display some of the data in the database.
//beginning of the include file section...
$feature_dir = "/home/peweb/peweb_features/";
$cpaddon_suffix = ".cpaddons";
$inc = ".inc";
$featurefile = $feature_dir.$row_plan_monthly['plan_name'].$inc;
$cpaddonfile = $feature_dir.$row_plan_monthly['plan_name'].$cpaddon_suffix.$inc;
include($featurefile);
include($cpaddonfile);
// begin the true looped display of data
echo '<td>';
echo '<table border="1" align="center" class="plandet">'."\n".
'<tr>'."\n".
'<td>'.$featurefile.'<br />'
.$cpaddonfile.'<br />'.$ror.'<br />Plan Name</td>'."\n".
'<td>'.$row_plan_monthly['plan_friendly_name'].'</td>'."\n".
'</tr>'."\n".
'<tr>'."\n".
'<td>Disk Space</td>'."\n".
'<td>'."\n".$quota.'gb</td>'."\n".
'</tr>'."\n".
'<tr>'."\n".
'<td>BandWidth</td>'."\n".
'<td>'.$bw.'gb</td>'."\n".
'</tr>'."\n".
'</table>'."\n" ;
echo '</td>';
//End the Loop
} while ($row_plan_monthly = mysql_fetch_assoc($plan_all));
//close the Table started in the beginning
echo '</tr>';
echo '</table>';
?>
Go here for an example of how this is currently working. http://www.pewebhost.com/builder_example.php
As you can see, the Loop structure seems to be working correctly, $featurefile seems to be redefined correctly, I just can't get this file to load as a set of variables which I can display. Instead, they are strings, which are always displaying...
Thanks,
Cliff