「 php 」 一覧
-
-
[php]期間指定で月一覧、日付一覧のデータ取得
2018/03/06 php
123456789101112131415161718192021222324#日付けで取得(yyyy-mm-dd)function get_period_date (){$startDate = date('Y-m-d', strtotime('2018-01-06'));$endDate = date('Y-m-d', strtotime("2018-01-09"));$diff = (strtotime($endDate) - strtotime($startDate)) / ( 60 * 60 * 24);for($i = 0; $i <= $diff; $i++) {$period[] = date('Y-m-d', strtotime($startDate . '+' . $i . 'days'));}return $period;}#月(yyyy-mm)で取得function get_period_month(){$startDate = date('Y-m-d', strtotime('2017-01-06'));$endDate = date('Y-m-d', strtotime("2018-01-09"));$diff = (strtotime($endDate) - strtotime($startDate)) / ( 60 * 60 * 24 * 30);for($i = 0; $i <= $diff; $i++) {$period[] = date('Y-m', strtotime($startDate . '+' . $i . 'month'));}return $period;}
-
-
phpでImageMagickを使うための各種インストール
2017/11/24 php
phpからImageMagickを使いたい。peclのimagickをインストー …
-
-
[php][日付け]指定日と日数を入力してその期間の日付け配列を取得する
2017/11/02 php
123456789//開始日から指定日数分のdate 配列の取得private function get_date_list($begin, $count){$i = 0;$arr_date=[];while($i < $count){$arr_date[] = date( "Y-m-d", strtotime("$begin +$i day ") );$i++;}return $arr_date;…
-
-
phpでcURLのhttps接続時エラー
2017/11/02 php
“TCP connection reset by pe …
-
-
[php]メモ_開始月と終了月を指定して、その間の各月、開始日・終了日を得る
2017/10/23 php
メモ 関数 [crayon-62bac7ceeb387188855 …
-
-
[php]mail()の送信元、エラー送信先設定(from, return-path)
ちょっと整理。 設定例 [crayon-62bac7ceeb6dd3415262 …
-
-
[php]ログインセッションの維持・有効期間について (session,cookie)
2017/05/26 php
cookieとsessionファイルと、登場人物が複数いるので、どこに何を設定す …
-
-
[Cake]CakePHPで意識の低いトランザクション commit rollback
cakeで複数のテーブルにまたがったトランザクション管理をしたい。 …
-
-
[PHP][PDO]prepareでのバインド方法整理
データをstmtに渡す部分をちょくちょく待ちがえて混乱するのでメモ 参考:htt …
-
-
[ruby][php]Excel出力操作の方法
Excel出力が要件としてもとめられた、言語は問わない、WEBではなくバッチで。 …