How to send data from MYSQL/PHP to a Coldfusion component?

▼魔方 西西 提交于 2020-01-16 19:39:11

问题


I'm trying to create functionality to output pages generated from MYSQL queries in PHP as PDF files.

To do this I need a way of wrapping up this data that is placed into dynamic tables and placing it between the tags, so it can be converted into a clean PDF.

I'm not sure where to start with this other than the coldfusion component will be called from the PHP page, rather than the other way round as I originally envisaged.


回答1:


I would pull the dynamic content from your php scripts like this:

<CFDOCUMENT format="pdf" src="url-to-php-script.php" mimetype="text/html" filename="#expandpath("your.pdf")#" />



回答2:


The part where the Coldfusion Component gets called by php is pretty simple to accomplish. Inside the the cfc you will have functions. If you make the access property = remote, that function will be available as a web service.

<cffunction name="NameOfFunction" access="remote" returntype="something">


来源:https://stackoverflow.com/questions/14237047/how-to-send-data-from-mysql-php-to-a-coldfusion-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!