julelustig Posted January 8, 2007 Share Posted January 8, 2007 Hi there!searching the forums dint get me anywhere, so I try direct posting ;) Here we go...I'm running an intranet at work and for that purpose I installed a virtual server (that's omnisecure here) and PHP (newest version).I configured the server and the localhost showed me the correct pages. Just without CSS. How do I teach PHP to parse the CSS-data as well?I checked the CSS itself, it works fine within an .html and the explorer reads it correctly. Just within the server environment it all goes wrong.What's to do? Feel free to give some advice :) Oh, but I'm no hacker, so please speak slowly and un-complicated ;)Cheers and thanks anyone reading this,Jule Quote Link to comment Share on other sites More sharing options...
kam_uoc Posted January 8, 2007 Share Posted January 8, 2007 your *.php files doent apply the css. is it your problem. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted January 8, 2007 Share Posted January 8, 2007 CSS isn't utilized by PHP. You can, though, use CSS in the HTML that your PHP script outputs. For example, say you create a 'header' file for the top of your page that contains HTML and the standard HTML tags like <head> and so on. You'd place your CSS link tag in the <head> section like you would normally. Then call the header into your scripts like:include 'header.php';Then, say you want to have some HTML mixed into your script:echo "<table><tr><td class='[b]yourCSSclasshere[/b]'";echo "<font class='[b]yourCSSclasshere[/b]'>blah blah blah</font>";echo "</td></tr></table>\n";Like that. Quote Link to comment Share on other sites More sharing options...
.josh Posted January 8, 2007 Share Posted January 8, 2007 servers don't parse css, browsers on clients do. Quote Link to comment Share on other sites More sharing options...
julelustig Posted January 8, 2007 Author Share Posted January 8, 2007 Thanks for your replies![quote author=simcoweb link=topic=121484.msg499622#msg499622 date=1168244240]Then call the header into your scripts like:include 'header.php';Then, say you want to have some HTML mixed into your script:echo "<table><tr><td class='[b]yourCSSclasshere[/b]'";echo "<font class='[b]yourCSSclasshere[/b]'>blah blah blah</font>";echo "</td></tr></table>\n";[/quote]Mmmh simcoweb,thanks especially for this. But i didn't get that part thouroughly. I DID include a header section in my standard page:[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head> <title>intranet .:*:. Dienstplan</title><?php include("tec/top.inc"); ?>[/code]just with the usual stuff, like script includes, and css include. top.inc, the header section, holds this:[code] <link rel="stylesheet" type="text/css" href="tec/style.css"> <script type="text/javascript" src="tec/script1.js"></script></head><body><table width="100%" height="100%" border="0"> .....[/code]Ah, and i forgot one thing: if i put it on a "real" webserver, the pages are presented correctly. AND: if i try this a t home, with the same virtual server and the same code, IT WORKS! If i tell the browser to show me the source code, it shows evrythin, all the includes like it should be. Doing the same with the version on the virtual server AT WORK the source code starts at <body> from the top.inc. Dunno why, had been checked with the MSIE, dunno about other browsers, since they don't use those at work.So it must be a server problem? Whats the difference between the virtual server i got at work and the one i use online? Strange. Quote Link to comment Share on other sites More sharing options...
julelustig Posted January 9, 2007 Author Share Posted January 9, 2007 Might it even be a network configuration problem? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.