Bookcafe

Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Thursday, October 11, 2012

Upgrading or Migrating From CakePHP 1 to CakePHP 2

It has been long time after my last posts on CakePHP and a lot of latest improvements have been carried out at the latest CakePHP 2. You could find the details regarding the migration especially involving the naming convention and you can read it here http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html.To my findings, when doing the basic application using this latest version, do not move or alter the following files or otherwise you will get errors messages:

1. /app/model/AppModel.php
2. /app/controller/PagesController.php

Once you have successfully setting the new version, you will get the screen below:

If you had followed my previous posts on CakePHP version 1.3, in the latest version CakePHP, you must change the following:


1. syarikats_controller.php   to  syarikatscontroller.php

2. var $scaffold;   to   public $scaffold;



Sunday, September 26, 2010

PHP Simple Image Gallery

It is a very easy to create a simple image gallery using PHP script. What I mean is that I'm using a PHP function glob. This function will output the name of files in the folder. If this function can display the name of the files, then of course it should be able to display the files especially image files. I used the HTML tag <img src="" /> to display the image file and thus I created a very simple image gallery. The following is the PHP code: