PHP
PHPのバージョンを5.3.0にしたらDeprecatedエラーがいっぱいでた。Deprecated: Function ereg() is deprecated in /hoge/hoge Deprecated: Function ereg_replace() is deprecated in /hoge/hoge E_DEPRECATED (integer) 実行時の注意。これを有効にすると、…
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are s…
よくファイル名を001、002などとするのだが、 PHPで数字を扱うと、1、2となってしまう。 そんなとき、桁数をそろえる方法。$num = 5; $num = sprintf ("%05d", $num);
$string = str_replace("\n", "", $string); $string = str_replace("\r\n", "", $string); $string = str_replace("\r", "", $string);
新しいサーバーのPHPにGDが入っていなかったので…#yum -y install php-gdapache再起動でおk