複製代碼 代碼如下:/********************** *@file - path to zip file *@destination - destination directory for unzipped files */ function unzip_file($file, $destination){ // create object $zip = new ZipArchive() ; // open archive if ($zip->open($file) !==
複製代碼 代碼如下:/************** *@length - length of random string (must be a multiple of 2) **************/ function readable_random_string($length = 6){ $c "m","n","p","r","s","t","v","w","x","y","z"); $vocal=array("a","e","i","o","u"); $password="";
ALTER TABLE table1 ALTER COLUMN [name] varchar(60) NULL; table1 表名 name 欄位名 為什麼加上[],因為name是sql關鍵字會衝突出現錯誤,這樣以防萬一。如果name欄位已經建立了索引,如果需要修改的話,必須先刪除索引才能正確的進行。 以上就介紹了notnull
複製代碼 代碼如下://xml string $xml_string=" Foo foo@bar.com Foobar foobar@foo.com "; //load the xml string using simplexml $xml = simplexml_load_string($xml_string); //loop through the each node of user foreach ($xml->user as $user) { //access
http://code.google.com/apis/ajaxsearch/documentation/#fonje 複製代碼 代碼如下:// This example request includes an optional API key which you will need to // remove or replace with your own key. // Read more about why it's useful to have an API key. // The
使用方法: Memcached 複製代碼 代碼如下:$cache = new Cache_MemCache(); $cache->addServer('www1'); $cache->addServer('www2',11211,20); // this server has double the memory, and gets double the weight $cache->addServer('www3',11211); // Store some data in the cache