ホーム > タグ > PHP

PHP

[PHP]PHPカンファレンス2008

  • 2008-07-22 (火)

京都から、出張してきました。
「激論!PHPの次に学ぶ言語はこれだ」

多分、どこでも言われてることだと思いますが、自然言語を学ぶことと、そんなに変わらないんじゃないでしょうか?

仕事につながるかどうか、ってことになったら、英語や中国語になるわけだし、フランスに興味がある人だったら、フランス語を知りたくなる。

多分、そんな感じでしょう。

[EC-CUBE]パンくずリスト

/data/class_extends/helper_extends/SC_Helper_DB_Ex.php
37行目に以下を追加


    function sfGetTopicPath($category_id){
        // 商品が属するカテゴリIDを縦に取得
        $objQuery = new SC_Query();
        $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
        $TopicPath = " > ";

        // カテゴリー名称を取得する
        foreach($arrCatID as $key => $val){
            $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?";
            $arrVal = array($val);
            $CatName = $objQuery->getOne($sql,$arrVal);
            if( $val != $category_id){
              $TopicPath .= '<a href="./list.php?category_id=' .$val . '">' . $CatName . '</a> > ';
            }else{
              $TopicPath .= $CatName;
            }
        }

        return $TopicPath;
    }
    function sfGetTopicPath2($category_id){
        // 商品が属するカテゴリIDを縦に取得
        $objQuery = new SC_Query();
        $arrCatID = $this->sfGetParents($objQuery, "dtb_category", "parent_category_id", "category_id", $category_id);
        $TopicPath = " > ";

        // カテゴリー名称を取得する
        foreach($arrCatID as $key => $val){
            $sql = "SELECT category_name FROM dtb_category WHERE category_id = ?";
            $arrVal = array($val);
            $CatName = $objQuery->getOne($sql,$arrVal);
              $TopicPath .= '<a href="./list.php?category_id=' .$val . '">' . $CatName . '</a> > ';
            }
        return $TopicPath;
    }

/data/class/pages/products/LC_Page_Products_List.php
107行目に以下を追加


            $TopicPath = $objDb->sfGetTopicPath($arrCategory_id[0]);
            $this->tpl_topicpath = $TopicPath;

/data/class/pages/products/LC_Page_Products_Detail.php
211行目に以下を追加


        $arrTopicPath = $objDb->sfGetTopicPath2($arrCategory_id[0]);
        $this->tpl_topicpath = $arrTopicPath;

/data/Smarty/templates/default/site_main.tpl
37行目に以下を追加


<!--{if $tpl_topicpath != ""}-->
<a href="<!--{$smarty.const.SITE_URL}-->index.php">TopPage</a>
<!--{$tpl_topicpath}-->
<!--{$arrProduct.name|escape}-->
<!--{/if}-->

[WordPress]cforms ヘッダの文字化け

cforms
かなり細かいところまで設定が可能なプラグインです。

ヘッダの日本語が文字化けするので、
cforms.php
1004行目を

$headers = "From: \"".mb_encode_mimeheader(get_option('blogname'),

1068行目を

if( @mail($to, mb_encode_mimeheader($vsubject), $fullmsg, $headers) ) {

に変更

[PHP]DBG/PHP Simple Debugger

http://dd.cron.ru/dbg/
より、

DBG moduleとDBG Listenerをダウンロード
extensionディレクトリに、
php_dbg.dll-x.x.xをコピー

php.ini
に、

extension=php_dbg.dll-x.x.x
[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on

を追加

http://uprising.s16.xrea.com/ishino16/phpdbg1.html
より、
PHP Simple Debuggerをダウンロードして、解凍

デバッグは、

http://URL?DBGSESSID=1@localhost

Home > Tags > PHP

Search
Feeds
[PR]

Return to page top

Canonical URL by SEO No Duplicate WordPress Plugin