The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. November 21, 2008, 03:02:46 AM

Login with username, password and session length


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

Posts: 772



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
*****
Online Online

Posts: 5138


:sniffle: Humor was so much easier before.


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

If I can't be Mr. Root then I don't want to play.
jairez
Journeyman
***
Offline Offline

Posts: 59


Not unless ROUND is funny.


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
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 772



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
Journeyman
***
Offline Offline

Posts: 59


Not unless ROUND is funny.


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
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 772



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.
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!