Solved

CFModule converted for PHP

Posted on 2012-12-28
5
261 Views
Last Modified: 2013-06-09
I am looking for a PHP equivalent of the cfmodule function. In my example, I am passing variables as well.  Is there a good PHP equivalent to this?

<cfmodule name="request.displayTable"
	jobinfoid="#np.id#"
	jobarea="ALL"
	jobtype="summary">

Open in new window

0
Comment
Question by:mopar003
  • 3
  • 2
5 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 38727533
Since I don't really understand ColdFusion, this may be a little bit speculative, but I'll tell you what I think I am seeing here.  It looks like a data base query asking for something like this:

SELECT * FROM displayTable WHERE jobinfoid = '$np->id' AND jobarea = 'ALL' AND jobtype = 'summary'

In this query statement, $np is an object, and id is a property of the object.  There is no requirement for this to be the case; the variable might be any string or integer value.  I was just echoing what I think CF is talking about.
 
Does that sound like it's on the right track?
0
 
LVL 1

Author Comment

by:mopar003
ID: 38727542
Nope.  CFModule is kind of like a big brother to the include file and/or functions.  It has a single depository location outside of the websites and allows multiple sites to call the same functions, without having to have duplicated code.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 38727559
Gotcha.  Here is what I recommend.  Make a copy of this question, then delete it and repost it anew.  Some of the EE community will not look at questions when there is already a dialog in process, assuming that the question is getting handled.  In this case, it's not, and a fresh post will be likely to get more eyes on it.  Best regards, ~Ray
0
 
LVL 1

Accepted Solution

by:
mopar003 earned 0 total points
ID: 38727743
Not the greatest workaround, but what I did was to include a base functions.php file in the php.ini file under (auto_prepend_file = "C:\PHP\CustomTags\functions.php"), which can include all of my existing functions.  Then call a function, passing the variables and getting the returned results.  

The only downside I see is that EVERY php page will call this and I am not sure if this will slow down PHP, since it may be loading in 1000 functions for every page, even though you may not be referencing them.
0
 
LVL 1

Author Closing Comment

by:mopar003
ID: 39232750
Works, but not very elegant.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wordpress errors showing up, hacked? 4 33
echo paypal data on screen 5 48
showing loader for php/mysql/ajax live search 13 23
cfscript coding help 4 15
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

786 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