mtronics
Mitglied
Hi,
Ich bin's wieder mit einem Problem. Und zwar habe ich diesen simplen code hier:
(Im CSS-Stylesheet sind nur die Platzhalter wichtig, alles andere kann vernachlässigt werden.)
Dies ist zwar nur die vereinfachte Variante, jedoch gibt mir echo $output einfach nur dasselbe wie echo $subject aus. Was ist das Problem?
Ich hoffe, ihr könnt mir helfen.
Gruß,
mtronics
Ich bin's wieder mit einem Problem. Und zwar habe ich diesen simplen code hier:
(Im CSS-Stylesheet sind nur die Platzhalter wichtig, alles andere kann vernachlässigt werden.)
PHP:
$subject = "body{ background-color: background_color; padding: 0px;}
h1{ font-size: 200%; font-family: Arial, Tahoma; color: heading_color; margin: 0 auto;}
h2{ font-size: 150%; font-family: Arial, Tahoma; color: second_heading_color; margin: 0 auto;}
h3{ font-size: 100%; font-family: Arial, Tahoma; color: heading_color; margin: 0 auto; text-align: center;}
h4{ font-size: 150%; font-family: Arial, Tahoma; color: heading_color; margin: 0 auto; margin-right: 7px; float: left;}
h5{ font-size: 110%; font-family: Arial, Tahoma; color: heading_color; margin: 0 auto; text-decoration: underline; margin-bottom: 7px;}
p{ font-size: 100%; color: text_color; font-family: Arial, Tahoma; margin: 0px;}
li{ font-size: 100%; color: text_color; font-family: Arial, Tahoma; margin: 0px;}
input{ margin: 0px; margin-top: -1px;}
textarea{ margin: 0px; margin-top: -1px;}
td{ font-size: 100%; color: text_color; font-family: Arial, Tahoma; margin: 0px;}
hr{ height: 1px; background-color: border_color; border: 0px; margin-left: -7px; margin-right: -7px;}
a{ font-size: 100%; font-family: Arial, Tahoma; transition: color 1s, text-decoration 1s; -moz-transition: color 1s, text-decoration 1s; -webkit-transition: color 1s, text-decoration 1s; margin: 0px;}
a:link{ color: text_color; text-decoration: underline;}
a:hover{ color: link_color; text-decoration: none;}
a:visited{ color: text_color; text-decoration: underline;}
a:active{ color: active_link_color; text-decoration: underline;}
#navbar a{ font-size: 100%; text-decoration: none;}
#navbar{ width: 100%; height: 30px; display: block; position: fixed; top: 0px; left: 0px; background-color: page_color; padding: 4px; margin: 0; overflow-y: hidden; border-bottom: border_color 1px solid; z-index: 100; box-shadow: 0px 3px 5px page_color;}
#content{ width: 90%; background-color: page_color; position: relative; top: 52px; padding: 7px; margin: 0 auto; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;}
#tilecontainer{ width: 100%; margin: 0px; position: absolute; top: 52px; left: 0px; padding: 0px;}
.smallimage{ margin: 3px; float: left; padding: 0px; border: border_color solid 1px; width: calc(20% - 8px); width: -moz-calc(20% - 8px); width: -webkit-calc(20% - 8px);}
.smalltext{ font-size: 80%; font-family: Arial, Tahoma; color: small_text_color; text-align: left;}
.navbarimage{ width: 30px; height: 30px; padding: 0px; margin-right: 7px; float: left;}
.tileimage{ width: 62%; margin-left: 19%; margin-right: 19%; margin-top: 19%; margin-bottom: 3%;}
.tinyborder{ border:1px solid border_color;}
.fatborder{ border: border_color solid 5px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; margin: 3px;}
.infobox{ width: 100%; height: 20px; border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; margin: 0 auto; margin-left: -4px; margin-bottom: 7px; padding: 3px;}
.listbox{ width: 100%; height: 20px; border: 1px solid border_color; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; margin: 0 auto; margin-left: -4px; margin-bottom: 7px; padding: 3px; background-color: heading_color;}
.listimage{ width: 14px; height: 14px; padding: 0px; margin-right: 7px; float: left;}
.listbox p{ color: text_color;}
.tabcontainer{ width: 100%; height: 30px; padding: 0px; margin: 7px; margin-bottom: -8px; margin-left: -7px; margin-right: -7px; z-index: 80;}
.tab{ width: 10%; height: 30px; float: left; margin: 0 auto; margin-left: 0.2%; margin-right: 0.2%; padding: 0px; border: 1px solid border_color; border-top-left-radius: 3px; border-top-right-radius: 3px; -webkit-border-top-left-radius: 3px; -webkit-border-top-right-radius: 3px; -moz-border-topleft-radius: 3px; -moz-border-topright-radius: 3px;}
.tab p{ margin:0 auto; text-align: center; margin-top: 5px;}
.activetab p{ color: text_color;}
.activetab{ background-color: heading_color; border-bottom: 0px;}
.inactivetab{ background-color: page_color; border-bottom: 1px;}
.tile{ width: 14%; margin-left: 1%; margin-bottom: 1%; float: left; padding: 0px; background-color: page_color; transition: background-color 1s; -moz-transition: background-color 1s; -webkit-transition: background-color 1s;}
.tile:hover{ background-color: link_color;}
.tile:active{ background-color: active_link_color;}
";
$search = Array( 'color_background', 'color_page', 'color_text', 'color_heading', 'color_heading_second', 'color_border', 'color_link', 'color_link_active', 'color_text_small' );
$replace = Array( $data['color_background'], $data['color_page'], $data['color_text'], $data['color_heading'], $data['color_heading_second'], $data['color_border'], $data['color_link'], $data['color_link_active'], $data['color_text_small'] );
$output = str_replace($search, $replace, $subject);
echo $output;
Dies ist zwar nur die vereinfachte Variante, jedoch gibt mir echo $output einfach nur dasselbe wie echo $subject aus. Was ist das Problem?
Ich hoffe, ihr könnt mir helfen.
Gruß,
mtronics