CALENDAR
S M T W T F S
     12
3456789
10111213141516
17181920212223
242526272829 
<< February 2008 >>
SPONSORED LINKS
ARCHIVES
CATEGORIES
RECOMMEND
ザッピング
ヤフーログール
あわせてよみたい
とらっくわーど
MOBILE
qrcode
スポンサーサイト

一定期間更新がないため広告を表示しています

| - | | - | - | pookmark |
ping
http://bulkfeeds.net/rpc
http://ping.rss.drecom.jp
http://ping.bloggers.jp/rpc/
http://ping.cocolog-nifty.com/xmlrpc
http://blog.goo.ne.jp/XMLRPC
http://rpc.tecnorati.jp/rpc/ping
http://rpc.weblogs.com/rpc2
http://ping.blogoon.net/
| サイト構築 | 16:38 | - | - | pookmark |
memo
uns01.lolipop.jp
uns02.lolipop.jp
| - | 03:19 | - | - | pookmark |
wpカテゴリ指定出力とpostratingsプラグイン
■カテゴリを指定して出力
$posts = get_posts('numberposts=3&category=4');
?>

ユーザー評価



    foreach($posts as $post) : ?>




■wp_postratings 表示
/*プラグインを有効化した後、

の間に以下を追加*/



| wp | 23:54 | - | - | pookmark |
ソニー銀行
残高0にしてある。口座解約手続きしてもOK。
| その他 | 11:44 | - | - | pookmark |
数字を3桁ごとにカンマで区切る
number_format(int);
| php | 01:23 | - | - | pookmark |
問題解決
金額に余計な文字列が入っていたため strip_tags 除去。
phpがsjisでdbがujisにしてる状態で、csvからdbにデータを取り込んだ場合、表示は文字化けしないのだがなんとなくエラー(W)になる。
変換指定するのが面倒そうなので、CSVからではなく、テキストをujisで保存してから取り込むと一応動く。根本的にはキチンとしないといけないかも。

| MySQL | 12:05 | - | - | pookmark |
文字列をSQL用に変換
// データをSQL用に変換
function cnv_sqlstr($string) {
if (get_magic_quotes_gpc()) {
$string = stripslashes($string);
}
$string = htmlspecialchars($string);
$string = mysql_real_escape_string($string);

return $string;
}
| php | 13:50 | - | - | pookmark |
文字コードの変換
// データの文字コードを変換する関数

function cnv_enc($string, $to, $from) {
$det_enc = mb_detect_encoding($string, $from . ", " . $to);
if ($det_enc and $det_enc != $to) {
return mb_convert_encoding($string, $to, $det_enc);
}
else {
return $string;
}
}
| php | 13:49 | - | - | pookmark |
| 1/1PAGES |