Tags
亲和力网站 小狗钱钱 72小时法则 apache C CakePHP Capistrano Catalyst change filename Cpan css cygwin Database Directory Dreamweaver encoding ext2 Geshi heredoc httperf IP address IPv6 Joomfish Joomla Jquery Junction Kannel Linux MacOS Magento NTFS Oracle Perl PHP Phtml print Read File Regex Shell SqlServer2005 ssh Test touch Ubuntu Windows
Tag Archives: CakePHP
How cakephp support UTF-8
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 … Continue reading
Writing a custom CakePHP console script
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 … Continue reading