2011-01-01から1年間の記事一覧
プレースフォルダに入れる値を"%hoge%"の様に予め%つけてぶち込めばおk
稀によく間違っているので参考にしないでください。 RewriteCond %{HTTP_HOST} ドメイン RewriteCond %{REMOTE_ADDR} IPアドレス RewriteCond %{REQUEST_URI} ホームディレクトリからのパス(先頭/必須) RewriteCondは連続して書くとAND条件。OR条件にしたけ…
本番URL hoge-fuga.jp ステージングURL pre.hoge-fuga.jp DirectoryIndex index.php index.html <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On #wwwなしに統一(本番環境のみ) RewriteCond %{HTTP_HOST} ^www\.hoge-fuga\.jp RewriteRule (.*) http://hoge-fuga</ifmodule>…
memberディレクトリ以下のみSSL、それ以外は非SSLの場合。 RewriteEngine on #SSLなページ。"/member/"へのアクセスがポート443以外なら RewriteCond %{REQUEST_URI} .*/member/.*$ RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQU…
<IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on #うんたらかんたら書く </IfModule>
.tpl {include_php file='../assets/includes/footer.html'} Smarty継承クラス allow_php_tag = true;
UPDATE hoge SET fuga = if(fuga = 1, 0, 1) WHERE piyo = ?
moperaUについて 「mpr2.bizho.net」と「mpr.ex-pkt.net」はどう違うのか? 後者は128kbpsで糞遅い。普通なら使う気会はあまりないだろうとのこと。 仮に接続したとしても別途料金は発生しない。 シムロックフリー端末を使う場合は後者を用いるしかないのか…
初期設定は無線LANで行う。 moperaUへ接続には別途設定が必要な為。 この段階では日本語を選択できないので、適当に英語ででも。 マーケットからMore Locale2をインストールして日本語化する。 APNの設定を行う(月額上限5,985円+基本料金コースの場合)。 …
Facebookアプリ 新規作成 https://developers.facebook.com/apps 許可アプリの一覧や削除 https://www.facebook.com/settings/?tab=applications 自分の作ったアプリ https://www.facebook.com/developers/apps.php アプリ登録時のいろんなパラメータの説明 …
半角スペース %20 # %23
こんな感じのテーブルなりcssで整えられたリストがあったとする。 ┌─┐┌─┐┌─┐┌─┐ │0││1││2││3│ └─┘└─┘└─┘└─┘ ┌─┐┌─┐┌─┐┌─┐ │4││5││6││7│ └─┘└─┘└─┘└─┘ ┌─┐┌─┐┌─┐┌─┐ │8││9││10││11│ └─┘└─┘└─┘└─┘ ┌─┐┌─┐┌─┐┌─┐ │12││13││14││15│ └─┘└─┘└─┘└─┘繰り返…
#ローカルアクセスのみ許可 order deny,allow deny from all allow from localhost
未設定だとディレクトリの中身丸見えなので.htaccessで対応する。 コンパネに入る ファイルマネージャを起動 設定するディレクトリに移動 表示アドレスへの操作 アクセス設定 indexファイル 「indexファイルの名前」にindex.phpとindex.htmlを追加 「ファイ…
激しく間違っていることも稀によくある。 FacebookアプリとFacebookページは別物 Facebookアプリ Facebookページで読み込むことが前提(単体で動くものもあるらしいけど…) ifameでこちらの用意したPHPを読み込む Facebookページ ファンページ→Facebookペー…
デフォルトのままではアイコン画像等をアップできないので、 ttp://d.hatena.ne.jp/bardothodol/20100526 のブログの ttp://program.kir.jp/script/twitteroauth_php.txt で上書き。
HAVINGでおk SELECT customer.*, COUNT(customer_user.id__customer) AS COUNT__customer_user FROM customer LEFT JOIN customer_user ON customer.id = customer_user.id__customer GROUP BY customer.id HAVING 0 < COUNT__customer_user
よく忘れるのでメモ。 alert( document.getElementById("hoge").options[ document.getElementById("hoge").selectedIndex ].value );
DB user::社員 id::社員ID name::社員名 project::案件 id::案件ID name::案件名 id__customer_user__agency::代理店(取引先)社員ID id__customer_user__client::クライアント(取引先)社員ID id__user__main_director::メインディレクター(社員)ID cus…
旧:http://twitter.com/home?status=ほげふが 新:http://twitter.com/intent/tweet?text=ほげふが 公式ドキュメント:http://dev.twitter.com/pages/intents いろんなパラメータがあるみたい。 url 指定したURLが自動的に短縮される模様 via 関連付ける…
タイトルが馬鹿ですが、うまく説明できなんだ。 private p(); } private function p() { print "super<br />"; } } class sub extends super { private function p() { print "sub<br />"; } } $o = new super(); //super $o = new sub(); //super protected(public)
テーブルは以下の通り。 ユーザは複数の部署に所属できる為、中間テーブルbelong_memberを設けている。 user(ユーザ情報テーブル id name belong(所属部署テーブル) id name belong_member(ユーザと所属部署を紐付け) id__belong id__user 取得したい結…
default_modifiersでhtmlを設定している場合 'quotes'だけでOK {~$tmp|escape:'quotes'~} default_modifiersでhtmlを設定していない場合 'quotes'→デフォルト('html')の二重 {~$tmp|escape:'quotes'|escape~} テストコード {~nocache~} <script type="text/javascript"> "); document…
index.php?id=hoge formタグのactionが空白だとエラー? <form ethod="post" action=""> <input type="submit" name="submit" value="送信" /> </form> なので下記の様に指定すると治った。 <form method="post" action="index.php?id={$smarty.get.id|escape}"> <input type="submit" name="submit" value="送信" /> </form> 調査したところ、 【action=""】と未指定 URLにG…
IPではなくユーザエージェントのサンプル。 PCサイト用→http://hoge.jp/ #携帯 RewriteCond %{HTTP_USER_AGENT} DoCoMo [NC,OR] RewriteCond %{HTTP_USER_AGENT} J-PHONE [NC,OR] RewriteCond %{HTTP_USER_AGENT} vodafone [NC,OR] RewriteCond %{HTTP_USER…
Smarty2から3になったことで仕様が変更された模様。 日本語マニュアル http://www.smarty.net/docs/ja/variable.default.modifiers.tpl では{$var|smarty:nodefaults}となっており、一見Smarty2と同じに見えるが、 英語マニュアル http://www.smarty.net/doc…
SELECT * FROM hoge WHERE fuga COLLATE utf8_unicode_ci LIKE '%piyo%'
<a href="javascript:void(0)" onclick="fncSubmit();return false;">送信</a> 送信関数の実行後に「return falase」必須。 ないとIE6ではサブミットはされるのに、画面が遷移しなかったりする。
通常、URLの#以降は以下のJSで取得できる。 対象URLが「http://hoge.jp/#fuga.php?id=piyo」の場合 alert( window.location.hash ); alert( window.location.hash.substring(1) ); 実行するとそれぞれ #fuga.php?id=piyo fuga.php?id=piyo と表示される。 …
PHP