Baidu Editor ueditor image upload Path Change method

Source: Internet
Author: User
Tags rand

Find the getremoteimage.php in the ueditor/php directory,

Law I: Amend the 12th line of Savepath "=>" upload/"to

The code is as follows Copy Code

1 "Savepath" => "upload/". Date ("Ymd"). " /"

Law II: the 80th Line

The code is as follows Copy Code

1 $tmpName = $savePath. RAND (1, 10000). Time (). STRRCHR ($imgUrl, '. ');

Amended to

The code is as follows Copy Code

1 $tmpName = $savePath. Date ("Ymd"). " /". Rand (1, 10000). Time (). STRRCHR ($imgUrl, '. ');

Hint, the date generated above is 20130407 so if you want more details we can

Amend the Savepath "=>" upload/"in line 12th to

The code is as follows Copy Code
1 "Savepath" => "upload/". Date ("Y"). " /.date ("M"). " /". Date (" Y ");

This better manage

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.