ユーザ用ツール

サイト用ツール

Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.metadata failed

よく使うphpのその1
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/4/4974d4ea96c454b55fcc568e44fd7fa2.i failed
Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/4/4974d4ea96c454b55fcc568e44fd7fa2.metadata failed
Writing /var/www/vhosts/w629.ws.domainking.cloud/enjoy-lei.com/lei_wiki/data/cache/3/3f1c1a51eaed3368199b75898a6ae75b.xhtml failed

よく使うPHPのその1

PHP JSON

PHPプログラムに一番最初に入れるもの

//エラーメセッジを見れるため
ini_set("display_errors","1");
//文字コードをUTF-8に設定
mb_internal_encoding('UTF-8');
//必要フォルダの設定
define("TWITTER_API_DIR",dirname(__FILE__)."/Services_Twitter-0.4.0/Services/");
//include設定
set_include_path(TWITTER_API_DIR."Twitter.php");
//PHPファイルを読む
require_once TWITTER_API_DIR.'Twitter.php';

サーバー時間の調整

echo "GMT時間:".gmdate("Y/m/d H:i:s")."<br />";
//$next = strtotime("+1 month", mktime(0, 0, 0, $m, 1, $y));
echo "日本時間:".date("Y/m/d H:i:s",strtotime("+9 hour", mktime(gmdate("H"),   gmdate("i"), gmdate("s"), gmdate("n"), gmdate("j"), gmdate("Y"))));

PHP一番最初よく使う時間のディファンイン

//	現在の時間
define("DF_TIME",time());
//今日
define("DF_TODAY",date("Y-m-d",DF_TIME));
//今月
define("DF_TOMONTH",date("Y年m",DF_TIME));
//昨日
define("DF_PAST_DAY",strtotime("-1 day",DF_TIME));
define("DF_PAST_DAY_YMD",date("Y年m月d日",DF_PAST_DAY));
//先週
define("DF_PAST_WEEK",strtotime("-7 day",DF_TIME));
//先月
define("DF_PAST_MONTH",strtotime("-1 month",DF_TIME));
よく使うphpのその1.txt · 最終更新: 2013/12/03 11:17 by luis_lee