session_unregister?session_unregister(‘var’);
You can use
unset($_SESSION['my_var']);[……]
$str = ‘測試字串’;
$fp = fopen(‘ftp://username:[email protected]/test.txt’,’w’);
fwrite($fp, $str);
fclose($fp);[……]
$str = ‘測試字串’;
$fp = fopen(‘text.txt’,’w’);
fwrite($fp, $str);
fclose($fp);
fopen()參數說明
[……]
$(document).ready(function(e) {
$('#test').click(function(e){
alert('觸發綁定事件');
});
$('#test').trigger("click");
$('#test')[0].click;
});http://www.pureexample.com/tw/jquery/custom-event.html[……]
/**
* VECTOR COOL
* https://vector.cool
*/
//用curl傳post並取回傳值
//一定要傳絕對路徑
function curl_post($url,$post)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST,true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST,'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch);
curl_close ($ch);
return $result;
}/** * VECTOR COOL * https://vector.cool */ $url='http://tw.yahoo.com'; $post_value= array( 'name' => 'JACK', 'age' => '20', 'phone' => '0968123456', 'address' => '台灣' ); echo curl_post($url,$post_value);
[……]
/* 找不到 */
SELECT * FROM news WHERE class = NULL
/* 找不到 */
SELECT * FROM news WHERE class IN ( 0 , 1 , NULL )
/* 要這樣寫 */
SELECT * FROM news WHERE class IS NULL[……]