Jump to content

CSS in PHP file


SubZero.

Recommended Posts

Hello guys, in the beginning I was thinking where exactly I can post this topic, here or in CSS section? But you guys are experts in PHP so I am asking here :-)I've found something like this:

<link rel="stylesheet" type="text/css" media="screen" href="http://www.EXAMPLE.com/file-with-css.php" />

Of course this php file nothing showed to my browser (no echo functions?).I am really guy who knows a LITTLE BIT of PHP, so I am asking you guys how to do this?

Link to comment
Share on other sites

It's working thanks!My next question is... as I said, I couldn't see what this php file had.I am doing like this:index.html:

<html><head>  <link rel="stylesheet" type="text/css" media="screen" href="s.php" /></head><body>TEST</body></html>

s.php

body {  margin: 0;  padding: 0;  background: #000000;  color: #FFFFFF;  font-size: 100px;  font-family: sans-serif;}

and when I open with my browser file s.php I see everything what that file have in (so in this example i see body{...}), how to make this php file to prevent from seeing whats inside?

Link to comment
Share on other sites

Hi..u can do that by following..ob_start();include('s.php');ob_clean();tell this file as t.php..but with this you can not apply css in ur pagebut may I know why u r doing silly thing.. am not getting..Regards,Vijay

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...