Zend PHP

News Tags - いろいろなNewsからキーワード抽出

社会 |  国際 |  経済 |  政治 |  スポーツ |  文化・芸能 |  科学・技術 |  話題のニュース |  国名別ニュース |  検索されたキーワード |  サイトのログを公開します |  愛飲しているコーヒー豆専門店

スポンサード

広告枠をオンラインで販売中!
広告出稿したい方はオンラインで今すぐ出稿可能。
 
 
 
 
 
 
 
 
 

Wiki - PHP Zend Framework Tips(ティップス)

arraysort

// 例えば、$itemsのインデックスがfloat値の場合、インデックスが文字列と扱われて // PHP関数だと期待通り動かないことがあるので、それを解決するためのユーザ関数です。 // 引数がない場合は、ASCでソートされます。 $sort = $argv[1]; $items = array('1.12'=>'a', '2.22'=>'b', '1.33'=>'c'); $cmp_func = ($sort == 'DESC') ? create_function('$a,$b','return ($a>$b)?1:-1;') : create_function('$a,$b','retu…

changelog

Release 4.1.0, 7/1/2006 * new support for XStandard.com Lite for BLOG:CMS WYSIWYG XHTML 1.1 editor * FCKEditor.net (WYSIWYG editor) updated to release 2.3 * update Dokuwiki to the latest release (2006-03-09b) * deleted (now useless) NP_SEO plugin due possible XSS exploit * fixed SQLite installation bug for NP_WYSIWYG plugin

dokuwiki

Wiki engine in BLOG:CMS is based on Dokuwiki, and more information can be found there. For installation just upload all files and change permissions (chmod 777) on these directories and files: /wiki/changes.log /wiki/attic/ /wiki/data/ /wiki/data/.cache/ /wiki/media/

forum

Forum in BLOG:CMS is based on PunBB Forum, more information can be found in official PunBB Support Forums. Forum is not installed by default, you have to install BLOG:CMS first, and when you click on /forum/ URL, you will be presented with an install script, very similar to BLOG:CMS install scripts. Just fill-in access data to MySQL database, the script will create table, and present you a content of config.php file. Create this file and upload it to /forum/config.php.

gethreffromhtml

ZendFrameworkのHttp/Client.phpを使うと速攻です。 require_once 'Zend/Http/Client.php'; $client = new Zend_Http_Client('http://www.google.co.jp'); $dom = new DOMDocument(); @$dom->loadHtml($client->request()->getBody()); foreach ($dom->getElementsByTagName('a') as $val) { echo $val->getAttribute('href')."\n"; }

photo

A simple, yet sufficient Photo Gallery that ships with BLOG:CMS, based on . To install it, just upload all files in /photo/ directory and set permissions (chmod 777) on these dirs: /photo/data/ /photo/data/cache/ /photo/data/logs/ /photo/data/logs/views..log /photo/galleries/

phptips

* 配列の昇順(ASC)・降順(DESC) * WEB HTML ページからdomを使って、a tag(aタグ)のhrefを取得する

plugins

Here you can find description of 60 plugins that come with BLOG:CMS. Right now the list is being built, so if you can, please help with this effort! :-) Some plugins, in order to output any content, need to be called in your skins and/or templates. E.g. to use NP_StickyItem plugin, you have to call it in your default skin like .

start

* Zend Framework PHP Sample Code * ZendPHP Web Api Sample Code * PHP 逆引きティップス(tips) Documentation for plugins: * Documentation for plugins Other BLOG:CMS components: * Singapore Photo Gallery * Dokuwiki engine * PunBB forum

zfactionhelpers

* DBのインスタンスを作成する * Actionからの呼び出し方 $this->_helper->getHelper('DB')->factory()->getDB() * 実際のサンプルコード

zfconfig

[production] type = PDO_MYSQL charset = utf8 host = localhost dbname = mydatabase username = root password = [production] hostname = www.zendphp.net sslhostname = www.zendphp.net base_url = / cache_lifetime = 60 project_name = ZendPHP site_title = ZendPHP site_sub_title = site_description = site_keyword = zend,zend framework,zendframewark,php view_escape=htmlspecialchars charset=UTF-8 output_encoding = UTF-8 internal_encoding = UTF-8 mail.charset=ISO-2022-JP mail.address=info@zendphp.net ma…

zfindex

zfplugin

* プラグインで共通でインクルードするファイルを指定する

zfscode

* index.php(トリガーファイル)の記述例 * 各種コンフィグファイルの記述例 * プラグインの記述例 * Views Helpersの記述例 * Action Helpersの記述例

zfviewshelpers

* 例えば、Rssフィードを読み込む(例外処理:try,catchを使って精度を高めても良い)