「blog.plastik.jp » PHP5 の fgetcsv() で読み込み内容が腐る現象」という記事を読みました。fgetcsv()だとSJISのCSVファイルがうまく読めないので、UTF-8に直してテンポラリファイルに保存してfgetcsvで読み込む、という筋書きのようです。 ちゃんとtmpfile()を使っていたりしてナイスなコードだと思います。でも、すぐ不要になるデータをディスクに書き込むのはイマイチじゃないでしょうか。ここはメモリに書いた方がカッコいいと思うんです。僕なら下記のようにします。 <?php $data = file_get_contents("example.csv"); $data = mb_convert_encoding($data, "UTF-8", "Shift_JIS"); $fp = fopen('php://memory', 'r+'); fw
こんにちは。ライフスタイル事業部のアリタと申します。 Yahoo!のサービスも裏側ではWebAPIが多用されています。1つのページを構成するのに5、6個のAPIを使うこともざらですが、それではさすがにパフォーマンスが問題となってきます。その原因と対策例を紹介していきましょう。 ■モデルケース 例として、3つのAPIから取得したデータをマッシュアップしたページがあるとします。(ここではサンプルコードを簡単にするため、APIの代わりに以下のRSSで説明としました) Yahoo!トピックス エンターテインメントRSS http://dailynews.yahoo.co.jp/fc/entertainment/rss.xml Yahoo!ミュージックマガジン最新情報RSS http://magazine.music.yahoo.co.jp/rss/ALL/rss.xml Yahoo!検索トレンドR
A CSS framework is a software framework created to allow for easier, more standards-compliant web design using HTML/CSS. Many popular CSS frameworks are design-oriented and contain elements that can be re-used in the creation of any website or app, as well as a grid system designed to provide a responsive CSS layout to webpages. All the frameworks listed in this article are free and open source. B
Many tutorials suggest that you set up the Zend AMF server directly in the bootstrap or index.php file. But what if you want to build a hybrid application with both Flex and HTML interfaces? In this case it’s better to let the bootstrap file do its usual job of application dispatching, and to make the AMF gateway a controller. Introducing the Gateway Controller Setting up a Zend AMF server inside
What is REST? REST is an architectural style, or set of conventions, for web applications and services that centers itself around resource manipulation and the HTTP spec. Web apps have traditionally ignored the HTTP spec and moved forward using a subset of the protocol: GET and POST, 200 OKs and 404 NOT FOUNDs. As we entered a programmable web of applications with APIs the decision to ignore HTTP
Ethnaのテストを動かそうとしてローカルの環境を整えていたら、simpletestが入っていなくて、さらにpearコマンドで入れようとしたら pearが入っていなかったので、インストールをしてみた。 ローカルの MacBookでは、phpもソースインストールではないので、元々入っているやつをそのまま使っている。 普段使っている CentOSならば、yumで、と行きたいところだが、Macなので、MacPortsかなーと思って探してみたが、それらしいのは無かった。 $ port search php $ port search pear そこでぐぐって出てきた、こちらのサイトを参考に入れてみた。ほぼそのままですが。 「Mac OS 10.5にpearをインストール│素晴らしき哉、人生!」 今回の環境はこちら。 Mac OS X 10.5.5 $ php -v PHP 5.2.6 (cli)
Daily free tutorials about web design, coding, jquery and more We available for hire! — Need help with a web or mobile project? From yensdesign we develop technology projects based on web apps, mobile apps, consulting and databases. We are young and hard workers, passionate about innovation and focused in new technologies. If you want to ask for a budget, we hare available for hire!. Nowadays, the
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く