忍者ブログ

カレンダー

03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

リンク

最新記事

カテゴリー

最新コメント

RSS

ブログ内検索

アーカイブ

[1]  [2]  [3]  [4]  [5]  [6

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

「~」と「~」

「~」と「~」

見た目は同じですが文字コードは別のものです。

拍手[0回]

PR

file_get_contentsでPOST

$url = "https://southzone.sakura.ne.jp/posted.php";
$data = array(
'vids' => array(0=> "1" , 1=> "2"),
'tids' => array(0=> "10" , 1=> "20")
);
$content = http_build_query($data , '' , '&');
$options = array('http' => array(
'method' => 'POST',
'content' => $content
));
file_get_contents($url , false, stream_context_create($options));

拍手[0回]

MySQL 複数カラムにinを使うwhere句

SELECT
    *
FROM
    table_name 
WHERE
    (col1, col2) IN (
        ("hoge", "fuga"),
        ("foo", "bar")
    )

拍手[0回]

#は\\でエスケープしないとシンタックスエラー

$(function(){
   // #で始まるアンカーをクリックした場合に処理
   $('a[href^=\\#]').click(function() {
      // スクロールの速度
      var speed = 400; // ミリ秒
      // アンカーの値取得
      var href= $(this).attr("href");
      // 移動先を取得
      var target = $(href == "#" || href == "" ? 'html' : href);
      // 移動先を数値で取得
      var position = target.offset().top;
      // スムーススクロール
      $('body,html').animate({scrollTop:position}, speed, 'swing');
      return false;
   });
});

拍手[0回]

php header

header('HTTP', true, 400);//phpのバージョンで正しく動きません

http_response_code(400);

拍手[0回]



忍者ブログ [PR]

graphics by アンの小箱 * designed by Anne