摘要:
PHP timezone服务器建议使用UTC 0区,且无夏时令,即Atlantic/Reykjavik。如果在个人PC上开发,建议也使用0区,与服务器一致。sudo vi /usr/local/php/lib/php.inidate.timezone = Atlantic/ReykjavikPHP error开发环境显示notice,“警告即错误”,要保证代码是0 notice 0 warning。sudo vi /usr/local/php/lib/php.inidisplay_errors = Onerror_reporting = E_ALL | E_STRICT生产环境不显示错误。su 阅读全文
摘要:
Linux 设置服务器时区 UTC 0区Linux服务器建议使用UTC 0区且没有夏时令,Atlantic/Reykjavik正好符合,这样各个程序都比较简单,时间不用算来算去的。“夏时令”也会影响时间的换算,wiki上有讲解。sudo tzselect 6) Atlantic Ocean65) Iceland5You can make this change permanent for yourself by appending the line TZ='Atlantic/Reykjavik'; export TZto the file '.profile' 阅读全文
摘要:
php-pear安装phpunit官方文档:http://www.phpunit.de/manual/current/en/installation.htmlecho 复制下面整段shell到命令行终端中,会自动逐条执行。sudo ln -s /usr/local/php/bin/pear /usr/bin/pearsudo pear config-set auto_discover 1sudo pear install pear.phpunit.de/PHPUnitsudo ln -s /usr/local/php/bin/phpunit /usr/bin/phpunitphpunit -- 阅读全文
摘要:
设置mysql监听外网ipsudo vi /etc/my.cnfbind-address = 127.0.0.1设置mysql 字符集 charsetsudo vi /etc/my.cnf在[mysqld]下面加入一行character_set_server = utf8在[mysql]下面加入一行default-character-set = utf8sudo /usr/local/mysql/support-files/mysql.server restartmysql -uroot -p1mysql> statusServer characterset: utf8Db chara. 阅读全文