2020-11-08から1日間の記事一覧

PHPでCSV一行ずつ読み込み

ネタ元 https://techacademy.jp/magazine/12298

PHPで文字列分割して配列へ

explode() — 文字列を文字列により分割するsplit()はもう非推奨。 ネタ元 https://www.php.net/manual/ja/function.explode.php

PHPで日付比較

strtotime()を使おう today = date("Y/m/d"); $target_day = "2014/06/10"; if(strtotime($today) === strtotime($target_day)){ echo "ターゲット日付は今日です"; }else if(strtotime($today) > strtotime($target_day)){ echo "ターゲット日付は過去です"…

PHPでmb_strlen()で日本語の文字数を数える

strlen()だとbyte単位になる。 ネタ元 https://www.flatflag.nir87.com/strlen-671#mb_strlen-2

さくらレンタルサーバーでComposerインストール&abraham/twitteroauthインストール

・SSHでログイン dos窓とかで。 ssh あなたのアカウント@あなたのドメイン.sakura.ne.jpその後Password聞かれるので入力でログイン・以下コマンドでComposerインストール curl -sS https://getcomposer.org/installer | php以下でComposerインストール状況確…