Forum Moderators: coopster
// Get the class template
include ('inc/page.class.php');// Page name
define('PLUME', $cleanfiletitle);
PLUME = new Page; // Parse error on this line// For .txt filename
$filename = "' . $textfilename . '";// If it exists...
if (file_exists($filename)) {
$file_contents = file_get_contents($filename);
$output = $file_contents;
} else {
$output = "No content. The associated text file could not be found.";
}// Variables required by class template
PLUME->Textfilename = "' . $textfilename . '";
PLUME->SetContent($output);
PLUME->Template();
My class is Page. Everything works fine if I use a php variable $cleanfiletitle instead of PLUME. I would appreciate knowing why I get a parse error for the line indicated.
Patrick
PLUMEin this case is a constant [php.net] and a constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script.
Complete details about defining constants here [us3.php.net].
Added: coop beat me to it. :)