摘要:
/** * wrap javascript codes with a html-tag * @author Wilson Zeng */function js($script){ return '<script type="text/javascript">'."\n".$script."\n".'</script>'."\n";}/** * wrap javascript codes with a html-tag & history back * 阅读全文
摘要:
/** * Like end(),return the first element of an array * @author Wilson Zeng */function first($stack){ if(is_array($stack)){ reset($stack); return current($stack); }else{ return $stack; }} 阅读全文
摘要:
/** * Enhanced force_download, can accept file in server * @author Wilson Zeng * @param $filename | The name that will use as the download file's nam... 阅读全文
摘要:
/** * Enhanced file_get_contents, use curl to fetch remote file * @param $file * @author Wilson Zeng */function ex_file_get_contents($file){ //if is ... 阅读全文
摘要:
/** * Enhanced trim() to support array * @author Wilson Zeng */function exTrim($mixed, $removeEmptyString = FALSE){ if(is_array($mixed)){ foreach($mixed as $index => &$item){ $item = exTrim($item); if($removeEmptyString && $item === ''){ array_splice($mixed, $index, 1); ... 阅读全文