Tags Archives: php

NiceDog nano php web framework

Last week I started on a simple web app that only has three pages. After I got the prototype working I wanted to clean up the code and switch over to using a more robust framework. Normally I would use something like CakePHP (PHP MVC framework). But since this web app is so small and didn’t need all the extra [...]

CakePHP – Disable validation in controler

When upgrading an old web application to start using CakePHP but the old systems was riddled with invalid data. When the creating the CRUD system I need a way of updating this invalid data. The following line of code will disable the validation in the controller. $this->Story->validate = array(); // Stop valadation on the story. Source: Cakephp Save [...]

Cakephp – Using the same view for multiple controler functions

Question: I have a Cakephp project the controller has several different methods. function Index() function IndexAuthor() And I want to use the same ‘view’ (or template, Index.ctp) for both of the methods of the control. Answer: You’re looking for Controller::render(). function IndexAuthor() { $this->autoRender = false ; $this->render(‘/stories/admin_index’); } Source: http://stackoverflow.com/questions/1753585/cakephp-same-view-for-multiple-functions

Troubleshooting CakePHP

I’m just starting to learn CakePHP 1.2 and I am running in to small little problems. As I find solutions I write them down so people after me might have an easier time finding them. Problem: Warning (512): Method HtmlHelper::file does not exist Warning (512): Method HtmlHelper::submit does not exist Solution: Those methods have been [...]