Cakephp bundle
Posted June 9th, 2008 by cakerhttp://macromates.com/svn/Bundles/trunk/Review/Bundles/PHP%20Cake.tmbundle/
Tags: cakephp
I’d love to change the world,but they won’t give me the source code.
Caker, Web developer,Beijing,China.
My projects
http://macromates.com/svn/Bundles/trunk/Review/Bundles/PHP%20Cake.tmbundle/
Tags: cakephp
with it you can migrate your database as migrate of rails ,it’s cool !
check out more information here .
http://developingwithstyle.com/category/web-dev/php/cakephp/db-migrations/
Tags: cakephp
the cakephp 1.2 realsed ,stable version coming up soon ,really good news, it’s time to build some webistes with it . maybe iphone.webcake.com is good case.
Tags: cakephp
for the app ,need set the
$html->charset(’utf-8′)
in your layouts file
for database, set the encoding in the database.php in the configure folder
Tags: cakephp
下载 了这个migrations,执行时候的时候发现提示没有找到Spyc,这里是大写的S,修改migrate.php里的vendor(‘Spyc’) 改成小写的s,修复!
Tags: cakephp
today ,I try to learn the console of cakephp , when i ran ‘cake schema generate ‘command, i got a undefined the `String` class ,and i try to get answer to #cakephp on IRC.solution:
adding this line :
uses(’String’);
at the top of all classes in cake\libs\model\datasources\dbo_source.php ,works fine!!
Tags: cakephp
it’s very easily!
for 1.1 or older ,add fllowing code to the constrctor of your add_model.php in your root’s directory .
parent::__construct($id, $table, $ds);
$this->execute(”SET NAMES ‘UTF8′”);
define(’MYSQL_SET_NAMES_UTF8′, true);
for 1.2 ,so easy ,just add one line to config/database.php in your webapplication folder
‘encoding’ => ‘utf8’
like as
var $default = array(
‘driver’ => ‘mysql’,
[...]
add these codes to a file,and put it in the vendor folder
// vendors/shells/demo.php
class DemoShell extends Shell {
function initialize() {
// empty
}
function main() {
$this->out(’Demo Script’);
$this->hr();
if (count($this->args) === 0) {
$filename = $this->in(’Please enter the filename:’);
} else {
$filename = $this->args[0];
}
$this->createFile(TMP.$filename, ‘Test content’);
}
function help() {
$this->out(’Here comes the help message’);
}
}