Hongmu Notes
Home Program Notes Original, what should I do if Imperial CMS7.5 cannot save images without suffix?
Program Notes Empire cms

Original, what should I do if Imperial CMS7.5 cannot save images without suffix?

Original, what should I do if Imperial CMS7.5 cannot save images without suffix?

Modify e/class/functions.php RepImg function

        $zz1="/\<(img|IMG) (.*?)(src|SRC)=('|\"|\\\\\"|)(.+?)(\.jpg|\.JPG|\.gif|\.GIF|\.png|\.PNG|\.bmp|\.BMP|\.jpeg|\.JPEG)(.*?)>/is";
        $text=preg_replace($zz1,"<\\1 \\2\\3=\\4".$exp1."\\5\\6".$exp2."\\7>",$text);

Change to

        $zz1="/\<(img|IMG) (.*?)(src|SRC)=('|\"|\\\\\"|)(.*?)('|\"|\\\\\"|)(.*?)>/is";
        $text=preg_replace($zz1,"<\\1 \\2\\3=\\4".$exp1."\\5".$exp2."\\6\\7>",$text);

Modify e/class/connect.php DoTranUrl function

       $r[filetype]=GetFiletype($url);

Add another line after

        if ((strlen($r[filetype]) !==4 ) OR (strlen($r[filetype]) !==5 )) $r[filetype]=".jpg";

After modification, the original normal use will not be affected, that is, pictures in ordinary form and pictures without extension can be correctly saved remotely.

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 353
Empire CMS obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 296
Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3749

Recommended reading

Responsive Healthcare Technology Medical Device Website Template 1058

Responsive Healthcare Technology Medical Device Website Template 1058 Practical Collection Yiyou template

This EyouCMS responsive template is ideal for the medical technology and medical device industries. Its professional, tech-oriented design effectively showcases medical device products, technological R&D initiatives, clinical applications, and corporate strength. It helps medical technology companies present their brands online and attract hospitals as well as distributors. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Common Questions About EyouCMS Installation...
👁 36
Health and Wellness Supplement Website Template (Deer Antler & Cordyceps Products) – 1059

Health and Wellness Supplement Website Template (Deer Antler & Cordyceps Products) – 1059 Practical Collection Yiyou template

An eYouCMS website template designed for the health and wellness supplement industry, as well as the deer antler and cordyceps product sectors. Its health-focused design is ideal for showcasing deer antler and cordyceps products, wellness knowledge, brand stories, and sales information. This template helps supplement brands effectively present their products online and attract health-conscious consumers. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: EasyYouCMS Installation Guide...
👁 44
Medical Device Research Website Template 1060

Medical Device Research Website Template 1060 Practical Collection Yiyou template

This EyouCMS template is ideal for the medical device and scientific research industries. Its professional, tech-oriented design effectively showcases medical device products, research projects, technical capabilities, and corporate image. It helps healthcare and research enterprises present their brands online and attract clients from hospitals and research institutions. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS...
👁 37
Resource website typecho001 template

Resource website typecho001 template Program Notes Typecho

typecho001 template template please do not modify the folder name of this template. The folder name is: typecho001 1.4 Fix the js output problem on the article page 1.3 Fix the error prompt when the plug-in is not installed Optimize the list page code output 1.2 Fix the comment function and add a custom homepage title 1.1 Fix the comment reply asymmetry function Add a separate title setting function on the homepage Add the website favicon.ico icon Add one...
👁 199
Responsive skincare and beauty cosmetics website template – 1061

Responsive skincare and beauty cosmetics website template – 1061 Practical Collection Yiyou template

An eYou CMS responsive website template designed for the skincare, beauty, and cosmetics industries. Its stylish and sophisticated design is perfect for showcasing skincare products, cosmetic collections, beauty services, and brand stories. This template helps beauty brands showcase their products online and attract female consumers. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for eYou CMS...
👁 35
Modification of typecho paging style

Modification of typecho paging style Program Notes Typecho

Sir, times have changed! Typecho is currently the most perfect solution, because Baidu can only see the code of fixed thinking. The actual generated HTML code is breathtakingly clean and fully customized, including adding classes to the li element, adding classes to the a element, adding classes to the previous page and next page, and removing the li tags that come with typecho to express more. I can even add some text to the content inside...
👁 517