Jump to content

passing css value to php


Go to solution Solved by 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

  • Solution

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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.