Ever wanted to split off functionality to a base class other then AppController? This is what was needed to prevent typing the same code over and over again in a project of mine. The app controller is great and all, but it’s just one class and you might want some functionality in only a part of your controllers. So lets [...]
This is as follow up on my previous blog post on “Why use an opcode cacher” In that post I mention you can store data in memory. The reason why one should want to do this, is again “performance” Just think about it, for each request, what amount of data is gotten over and over again? Most of the time [...]
Why use an opcode cacher? When users surf to the website(s) hosted on your machine, the php files are compiled each time. Compiling the php code you worked so hard to develop takes time, and the more files you have, the longer it takes. This is especially the case when using PHP frameworks(personally I use CakePHP) or when using a [...]
When trying to parse xml with php’s SimpleXml you’ll notice that the SimpleXmlElement comes up empty. Say you have the following xml structure: <root> <username> <![CDATA[ Text you want to escape goes here... ]]> </username> </root> When parsing that with SimpleXml the end result will simply be an empty tag: <root> <username> </username> </root> To solve this you need to [...]