Mac 開機自動啟動 mariadb
--
1. 查看 mariadb 的安裝目錄
# brew --prefix mariadb
/usr/local/opt/mariadb
- Dec 18 Fri 2015 10:41
[Mac] 設定開機啟動 mariadb
- Dec 17 Thu 2015 15:46
[PHP] Mac 上安裝 xdebug
步驟
1. 安裝 xdebug
# brew install php55-xdebug
2. 編輯 php.ini
- Dec 15 Tue 2015 10:33
[PHP] 設定顯示 PHP 的錯誤訊息
錯誤訊息無法顯示時,請照以下步驟檢查
1. 檢查 php.ini
display_errors = On
error_reporting = E_ALL
- Dec 14 Mon 2015 10:22
[Mac] 設定 LAMP 環境
==== 安裝 homebrew ====
OS X 的套件管理工具: http://brew.sh/index_zh-tw.html
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Dec 09 Wed 2015 15:50
[Mac] 安裝套件管理工具 - Homebrew
網址: http://brew.sh/index_zh-tw.html
安裝
請打開終端機,貼上下面這行
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Dec 09 Wed 2015 15:32
[Shell Script] 取得目前檔案的路徑
WORKDIR=$(cd "$(dirname "$0")"; pwd)
- Dec 02 Wed 2015 10:58
[PHP] CodeIgniter 的環境切換,設定 $_SERVER['CI_ENV']
在 CodeIgniter 的 index.php 中有這樣一段程式
/* *--------------------------------------------------------------- * APPLICATION ENVIRONMENT *--------------------------------------------------------------- * * You can load different configurations depending on your * current environment. Setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * NOTE: If you change these, also change the error_reporting() code below */ define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); /* *--------------------------------------------------------------- * ERROR REPORTING *--------------------------------------------------------------- * * Different environments will require different levels of error reporting. * By default development will show errors but testing and live will hide them. */ switch (ENVIRONMENT) { case 'development': error_reporting(-1); ini_set('display_errors', 1); break; case 'testing': case 'production': ini_set('display_errors', 0); if (version_compare(PHP_VERSION, '5.3', '>=')) { error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); } else { error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); } break; default: header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'The application environment is not set correctly.'; exit(1); // EXIT_ERROR }
這裡可以看到 ENVIRONMENT 的值是由 $_SERVER['CI_ENV'] 決定的
要設定 $_SERVER['CI_ENV'] 的話,在 Apache 底下是用
SetEnv {VAR_NAME} {VAR_VALUE}
- Nov 16 Mon 2015 14:57
[Bootstrap] 筆記
1. 一行放多個 input
form-inline clearfix
- Nov 07 Sat 2015 10:42
[DOS] 簡報 - 使用 DOS Command 完成工作流程自動化
- Nov 05 Thu 2015 10:58
[PHP] Xdebug 的 var_dump 顯示深度設定
因為預設的深度是 3 ,所以如果陣列超過 3 層就會被隱藏。
解決方法:
1. 編輯 php.ini
2. 在 xdebug 的區塊加上