ap_ Posted April 18, 2008 Share Posted April 18, 2008 im trying to put the cssdiplay() values in the config .php but it doesnt write them index.php <?php require("config.php"); require("main.class"); $cn = new build; print $cn->display(); ?> config.php <?php $margin = "30px"; $back = "media/black.bmp"; ?> main.class <?php ob_start(); class build{ var $title; var $keywords; var $margin; var $backg; var $font; var $linkcolor; var $none; public function display(){ print("<html>\n"); print("<head>\n"); print("<title>$this->title \n"); print(" $this->keywords</title>\n"); print $this->cssdisplay(); print("<head>\n"); print("<body>\n"); //print $this->maincontent(); print("</body>\n"); print("</html>"); } public function cssdisplay(){ print("<style type=text/css>\n"); print(" body{\n"); print(" margin-top: $this->margin;\n"); print(" background: url('$this->backg');\n"); print(" font: $this->font;\n"); print("}\n"); print("a:link{color: $this->linkcolor;}\n"); print("a:active{color: $this->linkcolor;}\n"); print("a:visited{color: $this->linkcolor;}\n"); print("a:hover{color: $this->linkcolor; text-decoration: $this->none;}\n"); print("</style>"); } } ob_end_flush(); ?> little help here? Link to comment https://forums.phpfreaks.com/topic/101712-using-configphp-with-a-class/ Share on other sites More sharing options...
Daniel0 Posted April 18, 2008 Share Posted April 18, 2008 You already posted that question here: http://www.phpfreaks.com/forums/index.php/topic,193145.0.html Link to comment https://forums.phpfreaks.com/topic/101712-using-configphp-with-a-class/#findComment-520421 Share on other sites More sharing options...
Recommended Posts