[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

call a cfm page inside php page

Posted on 2011-04-28
6
Medium Priority
?
613 Views
Last Modified: 2012-05-11
In my wordpress site, in my functions.php page, I've created a table so I can serve up some cookie data.  However, I need to invoke a coldfusion script instead.  Can I place an include inside that echo so that it reads my cfm page? basically, where the beginning and ending table tags are.

so the page would serve up everything inside that php page but also whatever is called inside my cfm page.
<?php
//customize header
remove_action('genesis_header', 'genesis_do_header');
add_action('genesis_header', 'child_do_header');
function child_do_header() { 
echo '<table cellpadding=\'0\' height=\'122\' cellspacing=\'0\' border=\'0\' width=\'960\' align=\'center\'>
<tbody>
<tr>
<td height=\'1\' colspan=\'3\' width=\'960\' bgcolor=\'#72D4EA\'></td>
</tr>
<tr class=\'headertext_b\'>
<td width=\'331\' height=\'122\'><img src=\'/images/header/left.png\' border=\'0\'></td>
<td align=\'center\' width=\'456\' height=\'122\' background=\'/images/header/middle.png\'>
<div style=\'padding-top:62px;\'>Call ' . (($_COOKIE["FIRSTNAME"])?$_COOKIE["FIRSTNAME"]." ".$_COOKIE["LASTNAME"]:'title') . " at " . (($_COOKIE["PHONE"])?$_COOKIE["PHONE"]:'303-996-1900') . '</div></td>
<td align=\'right\' width=\'173\' height=\'122\' background=\'/images/header/right.png\'><div style=\'padding-top:62px;\'>303-996-1900</div></td>
</tr>
</tbody>
</table>';
}
?>

Open in new window

0
Comment
Question by:COwebmaster
  • 3
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35488121
Is the domain able to parse cfm files?  If so, and assuming the cfm is returning pure data and no headers it should be possible.   But in a cross-domain situation, I doubt that it will work as intended.
0
 

Author Comment

by:COwebmaster
ID: 35488710
it would be the same domain.  the server can run both cfm and php.  the cfm page is in the root directory with the other php pages.  My question is how would I call that in that script?
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 2000 total points
ID: 35488724
>> My question is how would I call that in that script?

Hm.

iframe?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:COwebmaster
ID: 35488768
good call.  I was wondering if there was like #include file.cfm I can just add in there but maybe not
0
 
LVL 3

Expert Comment

by:dagaz_de
ID: 35504318
how about fopen

$fp = fopen("http://www.yourdomain/yourfile.cfm","r");
0
 

Author Closing Comment

by:COwebmaster
ID: 35517596
Thanks!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question