CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2001, 02:53 PM
Ides Ides is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Chicago, IL
Posts: 85 Ides User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via AIM to Ides
linking a .css file to a php script

Hello everyone.

I want to link a .css file to my php script. I tried ti include the .cc file but it gave me an error about include_path. I made sure the pathname was correct and it didn't work. Does anyone have any ideas?

Reply With Quote
  #2  
Old July 26th, 2001, 03:10 PM
andrew dupont andrew dupont is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: New Orleans (in summer); Austin (during school year)
Posts: 20 andrew dupont User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to andrew dupont
you don't include it with the include() function. you include it just as you would in HTML (between the HEAD tags):
Code:
<link rel="stylesheet" type="text/css" href="styles.css" />

(or whatever the name of your file is)

Reply With Quote
  #3  
Old July 26th, 2001, 03:24 PM
awfutr01 awfutr01 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 1 awfutr01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to awfutr01
You can also place the <link> element in another file and include that file.
For example, you can write a "header.inc" file like this:
<html>
<head>
<title>My Stuff</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>

and then include the header.inc file in your php file like this
<?php
include("header.inc");
include("otherfiles.inc");
?>

Reply With Quote
  #4  
Old July 26th, 2001, 06:32 PM
mbritton72 mbritton72 is offline
Shrill Digital God
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Raleigh, NC
Posts: 64 mbritton72 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m
Reputation Power: 8
Stylesheets can grow with your site and become pretty complex as different formatting requirements come up. I think it's a good idea to use them with include -- just make sure your include_path is adjusted in php.ini.

Windows:

include_path=".;c:\Webshare\Wwwroot\php\"

Point it to the directory where you want to keep your .inc files and the stylesheet will work.
__________________
I'm not impatient, I just have a low tolerance for boredom.

Reply With Quote
  #5  
Old July 26th, 2001, 06:50 PM
butcher butcher is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2001
Location: In a constant state of turmoil
Posts: 805 butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level)butcher User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 11 h 28 m 45 sec
Reputation Power: 34
mbritton72 has the answer to the question your asking.

If you run a phpinfo.php page, you will be able to find out what is set as the current include_path for your php setup. All you have to do then, is put your .css include file in that folder and it should work fine.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > linking a .css file to a php script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway