The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 21, 2019, 06:20:23 AM

Login with username, password and session length


Pages: [1] 2
  Print  
Author Topic: application or global php page  (Read 6801 times)
tomt
Rookie
**
Offline Offline

Posts: 18


View Profile
« on: December 31, 2007, 05:06:00 AM »

I mostly code in coldfusion. I have a customer who wants a project done in php. Up until this past Saturday I have never wrote one line of php, so I am currently taking a crash course in it.

Coldfusion has a template called application.cfm that executes every time before the actual page being called is. In asp I think it's called the global.asax page. Does php have the equivilant to either of these two types of pages?

Thanks,
Tom

Logged

No links in signatures please
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #1 on: December 31, 2007, 09:13:23 AM »

I am an asp guy and never use the global page, due to security-give-me-the-willies issues. So i just do an included page, that is my own global. i do the same thing in php, mostly cause that is what I am used to doing for so many years. i dont know though if there is a global page, but i dont think so.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: December 31, 2007, 01:07:53 PM »

KaptainKrayola on this board has exactly that experience (going from CF to PHP) and would be a good person to ping.

I'll PM him and ask him to weigh in on this thread.


Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #3 on: December 31, 2007, 01:28:02 PM »

Im a php wanna be too... done a little coldfusion just wondering what
version of server is out there my isp has 4.3 but 5.0 is out there..

is there a standard, preference amongst the cloud?
Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
tomt
Rookie
**
Offline Offline

Posts: 18


View Profile
« Reply #4 on: December 31, 2007, 03:59:02 PM »

Thank you, perkiset

I already have what is to be done in coldfusion. It's a custom program that runs on my own server. My customer wants the same program done in php. What I have been doing so far is going function by function making the translation. I have several windows opened on the documentation pages of php.net and using google. It took me two hours to figure out one custom function that I could do in cf in 10 minutes or less. But that is part of the learning curve.

Thanks again,
Tom
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #5 on: December 31, 2007, 07:26:04 PM »

No worries mate. I PMd him earlier but it may be a bit before he gets back.

In the mean time, if you have a sticking point and can articulate what the CF code does (not many of us read CF, perhaps JM can help too) then we can certainly assist you in getting the job done in PHP.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
jammaster82
Lifer
*****
Offline Offline

Posts: 666


Thats craigs list for ya


View Profile
« Reply #6 on: December 31, 2007, 07:39:07 PM »

 Ditto

ya man paste/post it here lets chop it up!

or over in the coldfusion part with krayola
would be good for the archives to flesh it
out and good for me and all to learn....

Perk, still waiting on the .dowhatimthinking()
class, ive got some apps i need to complete...

in the meantime ill work on my universal intention code pseudocompiler...
« Last Edit: December 31, 2007, 07:42:41 PM by jammaster82 » Logged

The watched pot, never boils... But if you walk away from it , the soup burns.  What gives?
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #7 on: January 01, 2008, 12:42:24 PM »

Sorry my friend, I've been stuck on the SET BUGS OFF preprocessor directive and haven't yet polished it off. I'll work on DO whatImThinking() probably this year.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #8 on: January 01, 2008, 02:30:37 PM »

There isn't (to my knowledge) an equivalent to application.cfm in PHP.  What the Kaptain would do instead is use a framework or methodology like FuseBox.  You can then take advantage of everything going through the controller and kind of simulate the functionality of application.cfm.

or if you prefer a less structured method you'll probably have to just include your own template as mentioned above.

good luck!


 
Logged

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

Posts: 10096



View Profile
« Reply #9 on: January 01, 2008, 06:01:48 PM »

Who the fuck was that?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
tomt
Rookie
**
Offline Offline

Posts: 18


View Profile
« Reply #10 on: January 02, 2008, 06:22:50 AM »

Quote
There isn't (to my knowledge) an equivalent to application.cfm in PHP.

I kind of figured that out and came up with a different solution. I should have the php part done by lunch today. Then it's onto the coldfusion backend, which I know best.

I am surprised that I was able to pick up php as easily as I did, but I can tell you it won't be my language of choice.

Thanks,
Tom
Logged

No links in signatures please
KaptainKrayola
Keeper of Pie
Global Moderator
Lifer
*****
Offline Offline

Posts: 994



View Profile WWW
« Reply #11 on: January 02, 2008, 07:24:28 AM »

Who the fuck was that?

YAR it be the ghost of Christmas past Tongue

hopefully the Kaptain will be around more this year...
Logged

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

Posts: 10096



View Profile
« Reply #12 on: January 02, 2008, 10:05:49 AM »

hopefully the Kaptain will be around more this year...

Although hopeful, I'd guess I'm not optimistic  Roll Eyes

JK KK, hope the new year is treating you right
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« Reply #13 on: January 28, 2008, 09:52:11 PM »

There isn't (to my knowledge) an equivalent to application.cfm in PHP.

auto_prepend ?

Cheers,
td
Logged

"I want to be the guy my dog thinks I am."
 - Unknown
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #14 on: January 28, 2008, 11:41:22 PM »

Din't even know about auto_prepend_file until you posted that VS... that's an interesting topic.
Have to give that a think and see if it fits for me.

Thanks!
/p
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1] 2
  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!