【发布时间】:2010-04-27 04:12:56
【问题描述】:
好的,我正在将一些非常基本的 PHP 转换为端口到客户端只有 CF 的开发服务器。我从来没有使用过它,我只需要知道如何移植一些东西:
<?php
$pageTitle = 'The City That Works';
$mainCSSURL = 'header_url=../images/banner-home.jpg&second_color=484848&primary_color=333&link_color=09c&sidebar_color=f2f2f2';
require('includes/header-inc.php');
?>
我知道:
<cfinclude template="includes/header-inc.cfm">
但是如何将 var 传递给包含,然后如何在后续包含的文件中使用它?
在我的 CSS (main.php) 中我也有(在顶部):
<?php
header('Content-type: text/css');
foreach($_GET as $css_property => $css_value) {define(strtoupper($css_property),$css_value);}
?>
我使用这样的常量:
#main-content a {color:#<?= LINK_COLOR ?>;}
我怎样才能让它也与 CF 一起使用?
从没想过我会和 CF 一起工作 :)
【问题讨论】:
标签: php css variables coldfusion porting