タグ

2009年3月16日のブックマーク (5件)

  • PHPでメモリ上に一時ファイルを作る - hnwの日記

    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

    PHPでメモリ上に一時ファイルを作る - hnwの日記
    puton
    puton 2009/03/16
    php://temp
  • Plugins | jQuery Plugins

    * Added live demo page (url at bottom of page) This project allows the user to extend the textarea element/area within the web page whenever they feel. I noticed this functionality when adding a plugin to this website, I guess it's not used that often on other websites. It is part of the Drupal code, although I haven't much experience with Drupal. I found it useful and could see an immediate use f

  • jQuery plugin: ‘autoResize’ - James Padolsey

    I remember googling for something of this nature a while ago but all I found were countless attempts using the cols and/or rows attribute of the textarea, thus making it pretty useless if you weren’t using a fixed-width font. Inspired by Jason Frame’s method, I’ve created an animating ‘autoResize’ jQuery plugin. Although it was inspired by his plugin it has a few slight differences, most notably t

  • Windows Server 2003でIIS 6.0とApacheなど他のWebサーバーを共存させたい

    1台のWindows Server 2003上でIIS(Internet Information Services)6.0とApacheの両方を利用しWebサービスを提供する予定です。別々のIPアドレスを割り当てた複数のネットワーク・カードを装着し,それぞれのIPアドレスに対して各Webサーバーのサービスをバインドさせたいと思っています。しかし,IISマネージャ上からIPアドレスのバインド設定をしてもIISがすべてのアドレスにバインドされてApacheが正常に稼働しません。Windows 2000のIIS 5.0で有効だったメタベースDisableSocketPoolingプロパティを設定しても解消できません。どうすればいいのでしょうか? IISはWindows 2000に搭載したバージョン5.0以降でソケット・プールという機能を搭載しています。このソケット・プールは異なるサイトへのアクセ

    Windows Server 2003でIIS 6.0とApacheなど他のWebサーバーを共存させたい
  • Ktai Library for CakePHP | ECWorks Blog

    携帯サイトを構築する場合の、各キャリア対応をサポートするライブラリと、それをCakePHPで利用するためのヘルパー・コンポーネントを公開いたします。ライブラリ体はCakePHPだけでなく他の環境でも使用することが出来ます。 【お知らせ】 ktailibrary.orgは諸事情ありまして閉鎖しました。 はじめに 携帯サイトを作成する場合、一般的には各キャリア向けにHTMLを作成し、それを振り分けして表示する仕組みを採用していたと思いますが、最近の携帯では、いくつかの仕様を除いてほぼ同じHTMLを閲覧することが可能になってきています。そこで、その「いくつかの仕様」についてを解決できるような仕組みができないものか…という経緯から、ライブラリが生まれました。 また、ライブラリは個人的に作成していたPHPライブラリがベースになっているのですが、CakePHPで使えるようにすることで「携帯サイト