【发布时间】:2011-02-12 11:17:06
【问题描述】:
我的问题如下:
我使用 000webhost 的免费托管服务。 我有一个动态的 CSS 样式表,方法是使它成为 PHP 并使它在几个(当前三个)样式表之一之间进行选择并使用它。 它在我的 Apache 服务器上运行良好,但在我的 000Webhost 站点上运行良好。
它根本不运行,但 cookie 已设置。
以下是三个 PHP 页面中的一些代码:
- 主页.php:
<html> <head> <?php include("../public_html/Include/Head.php")?>
<body> <?php include("../public_html/top.php"); ?>
- head.php
<?php $Send = $_COOKIE["Theme2"]; ?> <link rel="stylesheet" type="text/css"href="../public_html/stylesheet.php?beef=" />
- Stylesheet.php(我在剪切 CSS 代码的地方添加了以下内容:CSSHERE,否则会让人很难向下滚动!)
<?php header("Content-type: text/css"); ?> <?php if ($_GET["beef"]==1) { ?> CSSHERE <?php } elseif ($_GET["beef"]==2) { ?> CSSHERE <?php } elseif ($_GET["beef"]==3) { ?> CSSHERE <?php } ?>
【问题讨论】:
标签: php html css web web-hosting