简体   繁体   中英

zend framework global functions

Ok I know this is all sorts of Wrong.. But..

I have a few functions I use regularly, and I want to make them more easily accessible to me.

Right now I'm wrapping them in a Model_class as a work around, and I couldn't figure out what to do with them.

Where does someone put these common functions.

I'm sure others have third-party libraries which they must use, and I'm not sure where to put them.

-Patrick.

Put it in a file called functions.php and include that file in your bootstrap (index.php) file. Then you can access your precious functions everywhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM