PHP

PHPコード
<?php
$time = “2015-11-14 20:59:59”;
$patten = “/^\d{4}(0?|1)(0?||3)(\s+(0?|1 ...

PHP

PHPコード:
<?php
$str=”AA2016/06/13 14:31:56BB2014/12/31 13:21:45″;
$str2=”AA2016-06-13 ...

PHP

PHPコード:
<?php
//+ 1 year
$add_year = date(‘Y-m-d’,strtotime(“$date + 1 year”)) ...

PHP

PHPコード

<?php
echo substr_replace(‘abcdef’, ‘###’, 1);//a###
echo substr_repl ...

PHP

方法1–Smarty
<?php
require(“smarty/Smarty.class.php”);
$t = new Smarty;
$t->ass ...

PHP

PHPコード:
function globalClearFunc($global_array, $arg, $specialchars = true, $default = null) {
if(key_exists( ...

PHP

方法1
header(‘Cache-control: private, must-revalidate’);

方法2
session_cache_limiter(‘pri ...

PHP

PHPコード:
require __DIR__ . ‘./PHPExcel/IOFactory.php’;
$PHPReader = new \PHPExcel_Reader_Excel2007 ...

PHP

1. file_get_contents方法
function downLoadFile($file_url, $save_to)
{
$content = file_get_contents($file_ur ...

PHP

全角
preg_match(‘/^+$/u’, $str)

半角カナ
preg_match(‘/^+$/u’, $str);