The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 03, 2010, 05:35:33 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: ColdFusion 8 runs PHP and Ruby!  (Read 5385 times)
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 952



View Profile WWW
« on: June 04, 2007, 07:24:35 AM »

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?

Code:
<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.
Logged

We can't stop here, this is bat country.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 8744



View Profile
« Reply #1 on: June 04, 2007, 09:38:54 AM »

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

/p
Logged

It's the things you learn after you know it all that really count.
-John Wooden
jairez
Expert
****
Offline Offline

Posts: 151


JTFC


View Profile
« Reply #2 on: July 17, 2008, 09:48:58 AM »

Kapn ... I tried pasting your code into a new page and it didn't work.  I asked our CF admins about this and they replied back asking if <cf_php> was a custom tag?

Is there some setup our admins need to do to make this work?

I know this is an old post, but any help here would be greatly appreciated.

Thanx.

    - ja
Logged

Spontaneity has it's time and place.  [Sluggo, 1990-ish]
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 952



View Profile WWW
« Reply #3 on: July 17, 2008, 10:03:23 AM »

Wow finally another CF guy! 

Anyhow, it looks like the page i referenced in my post is gone but i found another good one with a link to download all the necessary files to make this work

http://scripting.riaforge.org/

The zip file on that site appears to have all the code (with examples) you need to make this work.  Give it a try and let me know if you need any help.

Good Luck! 

-KK
Logged

We can't stop here, this is bat country.
jairez
Expert
****
Offline Offline

Posts: 151


JTFC


View Profile
« Reply #4 on: July 17, 2008, 10:33:52 AM »

Quote
Wow finally another CF guy!
Yeah, it's easier to spell than PHP

This is awesome!  I'll get back to you with results, absolutely.

Thanx, Kapn.
Logged

Spontaneity has it's time and place.  [Sluggo, 1990-ish]
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 952



View Profile WWW
« Reply #5 on: July 24, 2008, 10:23:26 AM »

Just wanted to follow up and see if you had any luck with that.

so, any luck with that?

Logged

We can't stop here, this is bat country.
jairez
Expert
****
Offline Offline

Posts: 151


JTFC


View Profile
« Reply #6 on: November 25, 2008, 11:45:02 AM »

KK - apologies for not getting back to you on this.  Indeed it worked like a charm!  My sincerest thanx!    - JA
Logged

Spontaneity has it's time and place.  [Sluggo, 1990-ish]
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 952



View Profile WWW
« Reply #7 on: December 04, 2008, 08:58:53 AM »

Hey no worries - the Kaptain knows what it's like to be busy.

Have a good one and hit us up anytime  Grin
Logged

We can't stop here, this is bat country.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5326


DAMN YOU!!!!!!!


View Profile
« Reply #8 on: December 04, 2008, 09:42:58 AM »

something about this seems horribly wrong.

Like a mutant bastard child. Or cats and dogs playing together.

Logged
jairez
Expert
****
Offline Offline

Posts: 151


JTFC


View Profile
« Reply #9 on: December 04, 2008, 10:37:38 AM »

@NB - "Don't be afraid.  Go into the light ..."   Devilish
Logged

Spontaneity has it's time and place.  [Sluggo, 1990-ish]
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 952



View Profile WWW
« Reply #10 on: December 05, 2008, 09:55:37 AM »

something about this seems horribly wrong.

Like a mutant bastard child. Or cats and dogs playing together.



yer momma.
Logged

We can't stop here, this is bat country.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5326


DAMN YOU!!!!!!!


View Profile
« Reply #11 on: December 05, 2008, 10:34:41 AM »

lol

That doesn't mean its not cool.

mutants that shoot laserbeams from their eyes are cool.
Logged
mampy
Journeyman
***
Offline Offline

Posts: 68


View Profile
« Reply #12 on: December 05, 2008, 02:11:26 PM »

lol @ yer momma.....
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!