在設定php專案時會產生 .user.ini 無法移除
1. 使用lsattr查詢屬性
lsattr .user.ini
----i-------- .user.ini
如果出現 i 屬性,表示該文件已被標記為「不可修改」或「不可刪除」。
2. 先移除此屬性後即可刪除
sudo chattr -i .user.ini
sudo rm -rf .user.ini
在設定php專案時會產生 .user.ini 無法移除
1. 使用lsattr查詢屬性
lsattr .user.ini
----i-------- .user.ini
如果出現 i 屬性,表示該文件已被標記為「不可修改」或「不可刪除」。
2. 先移除此屬性後即可刪除
sudo chattr -i .user.ini
sudo rm -rf .user.ini
set_time_limit(0) //則是無上限
open terminal, type
touch ~/.bash_profile; open ~/.bash_profile
source ~/.bash_profile
export MAMP_PHP=/Applications/MAMP/bin/php/php5.6.10/bin
export MAMP_BINS=/Applications/MAMP/Library/bin
export USERBINS=~/bins
export PATH="$USERBINS:$MAMP_PHP:$MAMP_BINS:$PATH"
PHP is a dynamic, loosely typed language, that uses copy-on-write and reference counting.
所有的php變數型態都是定義在一個zval的struct,並且使用copy-on-write(寫入時複製)與reference counting(來判斷變數是否還有被使用)。
{
"require": {
"monolog/monolog": "1.2.*"
}
}
在首次安裝套件完畢後,會產生這個檔案,裡面記錄了所安裝套件的資訊。這個檔案的真正作用是:如果目錄中有這個檔案,執行安裝時,就不會去搜尋更新的版本,而是依照這個檔案中記錄的版本來安裝。這個設計很重要,因為新版的套件很有可能與目前使用的版本不相容,如果不是使用同樣版本,很難保證系統的穩定。過去在使用pear來管理套件時,如果不注意,就有可能發生升級導致的慘劇。
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/';
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
$config['base_url'] = "$root";
echo date('Y年n月d日',strtotime('2014-11-18'));
//define image path
$filename="image.jpg";
// Load the image
$source = imagecreatefromjpeg($filename);
// Rotate
$rotate = imagerotate($source, $degrees, 0);
//and save it on your server...
file_put_contents("myNEWimage.jpg",$rotate);