KaptainKrayola

From: http:// corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_

PHP

 
quote

Update: now supports Ruby as well as

PHP

 ! I'll post a couple of Ruby examples next.

We're always getting grief from those

PHP

  folks, aren't we? What if you could run

PHP

  code directly inside ColdFusion?


<cfset who = "Sean" />
<cf_

php

 >
<?

php

 
echo "Hello ".$_COLDFUSION["who"]."<br />";
$COLDFUSION["greeting"] = "wibble";
?>
</cf_

php

 >
<cfoutput>greeting = #greeting#</cfoutput>


quote
This outputs Hello Sean and greeting = wibble. Yes, you can pass ColdFusion variables into

PHP

  and set variables in

PHP

  that you can access back in ColdFusion land. [Note: Unlike the first version I posted, the new version takes no attributes but instead makes available the entire variables scope from the calling page - and now uses $_COLDFUSION which is more in keeping with

PHP

 .]


Should make porting code a TON easier. Applause

perkiset

Cool bridge kapn... excellent way to start moving across. Must make you a very happy little pirate  Applause

/p


Perkiset's Place Home   Politics @ Perkiset's