Unstoppable Domains

Php - Css

Spaceship Spaceship
Watch

WherezHost

Established Member
Impact
1
Yo i got a CSS script from another script and wanna insert it in ma php page. Im tryin to include it in ma php page with this code
PHP:
<?php

include 'style.css';

?>

But wen i go to the site @ www.nextlevelstuff.info it displays all the CSS code instead of applying it.
Safe please help me coz im totally gonners @ php safe
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
1. CSS isn't a script. :X
2. You don't include it with PHP. (or don't need to.)

<link rel="stylesheet" href="style.css" /> is how you do it.
You could echo that.

Also, if you are going to include a CSS file and it is how its supposed to be in a CSS file (no <style> tags), then you would do:

<style type="text/css">
<?php include('style.css'); ?>
</style>
 
0
•••
yeah there is no reason to use php include functions to link a css style sheet. as dan already mentioned, simply place <link rel="stylesheet" href="style.css" /> in the <head> tags of every html page. if u dont wanna go thru editin lots of pages, then mebbe u cud have another file called head.php or something where u cud put the exact code of what the <head> tags say and then just use the <?php include('head.php'); ?> throughout every page that u have so that u make a change to that one page and it is made on all the pages.
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back