Porting some PHP to ColdFusion

Posted by Oscar Godson on Stack Overflow See other posts from Stack Overflow or by Oscar Godson
Published on 2010-04-26T19:39:45Z Indexed on 2010/04/26 19:43 UTC
Read the original article Hit count: 265

Filed under:
|
|
|
|

OK, I'm working with converting some very basic PHP to port to a dev server where the client only has CF. Ive never worked with it, and I just need to know how to port a couple things:

<?php
      $pageTitle = 'The City That Works';
      $mainCSSURL = 'header_url=../images/banner-home.jpg&amp;second_color=484848&amp;primary_color=333&amp;link_color=09c&amp;sidebar_color=f2f2f2';
      require('includes/header-inc.php');
?>

I know:

<cfinclude template="includes/header-inc.cfm">

but how to i get the var to be passed to the include and then how do I use it on the subsequent included file?

Also in my CSS (main.php) I have (at the top):

<?php
    header('Content-type: text/css');
    foreach($_GET as $css_property => $css_value) {define(strtoupper($css_property),$css_value);}
?>

and im using those constants like this:

#main-content a {color:#<?= LINK_COLOR ?>;}

How can I get that to work also with CF?

Never thought I'd be working with CF :)

© Stack Overflow or respective owner

Related posts about php

Related posts about coldfusion