こんにちは。小川です。 本日は数あるPHPの関数の中でも、わりと知られてそうで実は知らない人もいるかもしれない便利な関数をご紹介します。 ■nl2br 改行コードを<br />に変換する関数です。 <?php $string = <<<EOS foo bar baz EOS; echo nl2br($string);
pimcore - Enterprise Content Management Framework ZendFrameworkとExtJSを使った超リッチかつ多機能なCMS「pimcore」 それなんてアプリ?といってしまいそうなリッチな管理画面やWYWIWYG編集、コンテンツのバージョン管理、A-Bテスト等、機能盛り沢山となっています。 管理画面を一見しただけでその高機能さが伺え、使ってみたいという気にさせられます。 バージョン管理機能がいい感じで、次のように、修正前、修正後がtracみたいにわかりやすく表示してくれます。 コンテンツはリッチで綺麗なUIで編集することができるみたいです。 ファイルはツリーで管理でき、画像とかはなんとWEB上でPhotoshopっぽいツールで編集できるようです。 CMS上にコンテンツと連動させた形で、GoogleAnalyticsのAPIを使った解析画面も
phpmd PHPコードのバグ可能性発見や未使用変数等を解析できる「PHP Mess Detector」。 pearコマンドでインストールすると、phpmd コマンドが使えるようになり、そのコマンドを使ってPHPコードの最適化ができます。 たとえば、未使用変数は次のようにして解析&結果が出ます $ phpmd test.php text unusedcode test.php:4 Avoid unused private fields such as '$FOO'. test.php:5 Avoid unused private fields such as '$i'. test.php:12 Avoid unused private methods such as 'foo'. test.php:14 Avoid unused private methods such as 'bar'.
ZendStudioに同梱されている「ZendCodeAnalyzer」というツールを業務で使ってたんですが, 残念ながらZend Studio 7 評価版で確認したところ含まれていないようです。*1 ※ZendCodeAnalyzerを使用するにはZendStudioのライセンスが必要です。 そこで代わりになるものを探してたらありました,PHP Mess Detector です。 PHPMDとは,JavaでいうところのPMDで,以下のような問題を見つけてくれます。 バグの可能性 準最適なコード 複雑な式 未使用パラメータ,メソッド,プロパティ 今日(2010/05/26)時点の最新版が,PHPMD 0.2.5 (2010/04/03 released) なので,早速このバージョンで試してみます。 前提環境 PHP >= 5.2.3 PHP_Depend >= 0.9.11 [root@l
The appeal of this subject is easy to understand, but the details are where readers…
今更ながらですが、PHPのmagic_quotes_gpcをOnにすべきでない理由を整理してみます。 世の中には、magic_quotes_gpcはOffにすべき、と書いた文章は多数あるのですが、その理由を(私が見る限りで)十分に説明しているものは無いからです。 以下では、 1. 対象外の変数の存在 2. 弊害(副作用) 3. エスケープの不完全さ という三つの観点から記述します。 対象外の変数の存在 magic_quotes_gpcの、「gpc」はGET/POST/COOKIEを表しています。つまり、この3種類のリソースからの入力はエスケープされますが、それ以外は原則エスケープされません。 エスケープされているもの、されていないものを、以下にまとめてみます。 エスケープ済み ・$REQUEST $_GET・$_POST・$_COOKIE 場合によってエスケープ済み ・$_SESSION(
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
Let me first start off by saying that the Zend Framework has been very good to us.It enabled us to build a kick-ass application in a relatively short amount of time. On top of that, we followed the conventions from Zend and PEAR and essentially have a very maintainable piece of software which I don't hate looking at every day (which is as one can imagine, a huge plus).The other day our servers wer
Tonight I wanted to see how the Zend Framework would run against an application that I have put in quite a bit of components into. I figured with the amount of objects that have been instanciated that there was likely going to be a larger performance hit overall. These results may surprise you with what really made a difference as far as PHP Accelerators. Zend Framework : Release 1.0.3 Zend_Cache
表目次 2.1. サンプル CMS 用のアクセス制御 3.1. 設定オプション 3.2. サーバのオプション 3.3. デバッグメッセージ 3.4. Active Directory 用のオプション 3.5. OpenLDAP 用のオプション 4.1. Core フロントエンドのオプション 4.2. Function フロントエンドのオプション 4.3. Class フロントエンドのオプション 4.4. File フロントエンドのオプション 4.5. Page フロントエンドのオプション 4.6. File バックエンドのオプション 4.7. Sqlite バックエンドのオプション 4.8. Memcached バックエンドのオプション 4.9. Xcache バックエンドのオプション 6.1. Zend_Config_Ini コンストラクタのパラメータ 9.1. 通貨記号の設定を指定する
今回は、PHPUnit3の便利な機能とPHP版プロジェクトビルドシステムであるPhingとの連携について見ていきます。 既存クラスからテストを作成する さて、別の開発チームで作成していた決済用クラス(Checkoutクラス)が届きました。 <?php require_once 'Cart.php'; class Checkout { private $cart; public function __construct(Cart $cart) { $this->cart = $cart; } public function getSubTotal() { return $this->cart->getTotal(); } public function getShippingCharge() { if ($this->cart->getTotal() > 1500) { return 0;
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く