files uploaded by him are stored in one directory, which is invisible when you use the preceding three types of browsing,
Therefore, you need to modify the files in FCKeditor/Editor/filemanager/upload/PHP/. Another problem is what file name is uploaded by default.
Finally, why does the name of the server exist for you. In this way, I feel that writing is not suitable. I made some simple changes.
The configuration in config. php is modified as follows:
Code: [copy to clipboard] Global $ config;
. request. files ["filedata"]; string uploadpath = httpcontext. current. server. mappath (@ context. request ["folder"]) + "\"; if (file! = NULL) {If (! Directory. exists (uploadpath) {directory. createdirectory (uploadpath);} file. saveas (uploadpath + file. filename); // if the following code is missing, the context will not automatically disappear after the upload queue is successfully displayed. response. write ("1");} else {context. response. write ("0 ");}}
6. The effect after running is a
Event-based programming and howThe yii component class implements this to make raising and handling events easy. the final article will walk through using behaviors (also called mix-ins), what they are, how you can use them, and how yii implements them.
So let's get started on our first topic.Properties
A property defines a retriable aspect of a class; it exposes the class 'interface enabling you to manipulate it to do your bidding. for example, properties on an image
Official website: http://fex.baidu.com/webuploader/Plugin Download: https://github.com/fex-team/webuploader/releases/download/0.1.5/webuploader-0.1.5.zipThe following starts the use of WebuploaderThe first kind, simple and rude.Front-End Code:Background code:public string SaveFile () { if (Request.Files.Count > 0) { request.files[0]. SaveAs (Server.MapPath ("~/app_data/") + Path.getfilename (Request.files[0]. FileName)); Return "Save succeeded"; } Return "not read to fi
Recently in the project to use the Baidu file image upload plugin webuploader. Share to everyoneNeed to click on http://fex.baidu.com/webuploader/download.html to open the link to download Webuploader/*image Upload*/ var$ =JQuery, $img=$("#imagePath_img"), //optimize retina, under Retina This value is 2Ratio = Window.devicepixelratio | |1, //Thumbnail sizeThumbnailwidth =1*ratio, Thumbnailheight=1*ratio,//Web Uploader InstancesUploader;//init
Define a CDATA temporary container that serves as a place for placing picture path informationSecond, the Attachmentsimple component is located in the file Onloadmodel by JS limit the type and number of file uploadModel.prototype.modelLoad =function(event) {vardata = This. Comp ("Data1"); //limit only upload pictures and videos can be set on the Accept varuploader = This. Comp ("AttachmentSimple2"). Uploader; /**//Set multiple attribute value i
. The script will automatically save the obtained authorization information to the CONFIG_FILE variable corresponding configuration file, default to ~/.kuaipan_upload.conf
4. Instructions for use
Kuaipan Uploader v1.1.0 wangheng-wujiwh@gmail.com Usage:/usr/bin/kuaipan COMMAND [PARAMETERS] ... Commands: upload [local file] Download [remote file] delete [remote file/remote dir] list Info relink For more Informations, please vi
Old registered a blog Park account, yesterday only found that even the blog did not open, GitHub is the same, deep feeling ashamed, hurriedly dive a water pressure yajing ' (*∩_∩*)Anyway Probably many people will use the file upload function, upload the library seemingly also many, for example (jQuery File Uploader, Fineuploader, uploadify, Baidu Web Uploader , etc.), the function is very powerful, The code
are described below: uploader : The relative path to the uploadify.swf file, which is a button with a text browse, and then fades out of the Open File dialog box with the default value: uploadify.swf. NBSP Script : The relative path of the spooler. Default value: uploadify.php checkscript : The relative path of the spooler that is used to determine whether the uploaded selected file exists on the server filedataname : Sets a name for the
files
$sql = "INSERT into Upfile (Id,filename,fileshow,date,uploader,type) VALUES (', ' $myfile _name ', ' $fileshow ', ' $date ', ' $ Uploader ', ' $type ');
$result =mysql_query ($sql);
echo "uploaded the file successfully, three seconds to return to the main page";
}
else {
echo "Upload file is unsuccessful, return to main page after three seconds";
}
?>
Sorry, gentlemen, forget to say that you want to
This article explained the code of Plupload, realized the Ajax multiple map upload at the same time, and then zoom the picture, and finally show the picture, share for everyone to reference, the specific content as follows
1, the article View call Plupload
2, \common\widgets\plupload components
3, Backend\assets\uploadassetRegister Related JS
4, Js/upload.jsAjax Processing Code
function Initcoverimageuploader (buttonid,contatinerid,maxfilesize,url,csrft
These days to do a project in the WYSIWYG editor to achieve the image upload function, I prefer the CKEditor interface and chose it. Although have with CKEditor with good ckfinder, but this dongdong function is too complex, a simple look at the Ckedtior document, found that this function can be achieved without the help of Ckfinder.
Although the following code is based on the YII framework, but with other frameworks or language ideas are exactly the same, the need for children's shoes can be re
If you want to specify a particular file type when you/> This HTML element with
The type that follows the character can be specified at will, and can be separated by commas if you want to specify more than one type.
When you use the upload component of fine uploader, if you need to qualify the file upload type, the method is
var manualuploader = new QQ. Fineuploader ({
element: $ ("#manual-fine-uploa
end (is not the gray long happy!!) ), below for our play, upload the picture.
Because it is the test interface, the company's project to be compatible with the lower version of the browser, all plupload.js on the field (not I do not want to use the H5 method). Official website, download after the picture, it is enough. (Remember to load in Layout.jade)
Change the index.js to the following appearance, this is a standard official online biography, do not understand in the official website loo
set to true, has a reversal effect when the mouse is moved over the browse button.Width: Sets the navigation button widths, the default value: 110.Height: Sets the browse button heights, default value: 30.Wmode: Set this as transparent to make the flash background file transparent for the browse button, and the Flash file will be placed at the top level of the page. Default value: Opaque.CANCELIMG: Select the Close button icon on each file after file to the file queue
Uploadify also brought a
TinyMCE I will not introduce more, this is the download address: https://www.tinymce.com/download/
Download down is English version, to Chinese is also very simple.
First go to the Internet to download a Chinese-made package, and then unpack the Langs folder in the zh_cn.js copy to your download TinyMCE langs folder on the line. Finally, add "language:" ZH_CN "in the Tinymce.init" (the code will be posted later)
Local image upload I use the uploadify and UI in jquery, so I need to draw Jquery
the configuration needed to upload and shoot the cloud. In fact, it is also very simple, the main is the URL and multipart_params two parameters to configure. The Options.bucket, policy, and signature in the following example directly use the values computed in the previous section.
Copy Code code as follows:
var uploader = new Plupload. Uploader ({
...
URL: ' http://v0.api.upyun.com/'
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.