[轉]php list
Awesome PHP http://briteming.blogspot.tw/2014/04/awesome-php.html
Awesome PHP http://briteming.blogspot.tw/2014/04/awesome-php.html
http://stackoverflow.com/questions/16723877/jquery-file-upload-maxnumberoffiles-and-getnumberoffiles-options I believe getNumberOfFiles was only added as an option to a recent version of jquery.fileupload-ui.js (8.2.1). As an alternative, you can set the option singleFileUploads to false, and in the add callback you can throw errors if more than one file is added. var maxFiles = 1; $('#fileupload').fileupload({ singleFileUploads: false, url: '/uploadUrl' }).bind('fileuploadadd', function (e, data) { var fileCount = data.files.length; if (fileCount > maxFiles) { alert("The max number of files is "+maxFiles); return false; } });
https://github.com/blueimp/jQuery-File-Upload/issues/622 看連結最下面 Here is some updated code that works with the most recent version as of July 18, 2014. class CustomUploadHandler extends UploadHandler { /* Converts a filename into a randomized file name */ private function _generateRandomFileName($name) { $ext = pathinfo($name, PATHINFO_EXTENSION); return md5(uniqid(rand(), true)).'.'.$ext; } /* Overrides original functionality */ protected function trim_file_name($file_path, $name, $size, $type, $error, $index, $content_range) { $name = parent::trim_file_name($file_path, $name, $size, $type, $error, $index, $content_range); return $this->_generateRandomFileName($name); } } $upload_handler = new CustomUploadHandler();
http://stackoverflow.com/questions/11757537/css-image-size-how-to-fill-not-stretch .container { width: 150px; height: 100px; background-image: url(“http://i.stack.imgur.com/2OrtT.jpg"); background-size: cover; background-repeat: no-repeat; background-position: 50% 50%; } http://stackoverflow.com/questions/9883289/set-background-image-css-to-the-featured-image-in-wordpress-using-jquery 這個做了我想做的事,也是高手 $(‘section img’).each( function(){ var src = this.src, h = $(this).height(), w = $(this).width(); $(this).closest(‘div’).css({ ‘min-width’ : w, ‘min-height’ : h, ‘background-image’ : ‘url(’ + src + ‘)’, ‘background-repeat’ : ’no-repeat’, ‘background-position’ : ‘50% 50%’ }); }).remove(); ======= ‘background-image’ : ‘url(’ + src + ‘)’, 記得在加上”" => ‘background-image’ : ‘url("’ + src + ‘")’, ...
像最近弄php後台,jquery php css jtable database jqueryfileupload,整個用了一遍 結論 要有好用 快速的framework 真的用ror肯定沒錯,因為開發久了,pg才是真正花時間的,省不下,沒工具就是省不下時間 回頭看java真的是怪物,開發速度暴減 php用framework就像ror一樣,主機是不開放更新framework