Parsing strings from file_get_contents
Posted: Sat Sep 10, 2005 12:03 pm
I'm trying to make a page builder script so that I have a minimal amount of hard coded code. I have quickly run into problems though. I want one of my classes to do file_get_contents of a file that contains a basic beginning of each page.
Now just as an example, I want the defvar::styles to be parsed into what it's value is. I have this value , which I have set as an extends to the main class.
simplified class...
What do I have to do to get the defvar::styles to parse so that when it's outputted, it has the correct value?
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>swigg.net</title>
<style type="text/css">
@import "defvar::styles";
</style>
</head>
<body>simplified class...
Code: Select all
class pbuild extends defvar
{
$tagon = file_get_contents($file);
var_dump($tagon);
}