Jump to content

passing css value to php


Yohanne

Recommended Posts

Hi all,

 

 

i have 3 files with .css and 2(.php) 

 

first i have this->

1.php

$public = dirname(__FILE__).'../assits/public/home.php';               
require_once($public);

2.php

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Under The Bridge</title>
<link href="style.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
sample
</body>
</html>

style.css

body
{
background-color:#000000;
}

now when i trying to view the result, the background  from css could not effect, while the the txt "sample" is there. why? and where i am doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/279852-passing-css-value-to-php/
Share on other sites

Hi all,

 

 

i have 3 files with .css and 2(.php) 

 

first i have this->

1.php

$public = dirname(__FILE__).'../assits/public/2.php';               
require_once($public);

2.php

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Under The Bridge</title>
<link href="style.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
sample
</body>
</html>

style.css

body
{
background-color:#000000;
}

now when i trying to view the result, the background  from css could not effect, while the the txt "sample" is there. why? and where i am doing wrong?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.