Home > CMS Tutorial > DEDECMS > body text

What should I do if the DEDE backend has updated ads but the frontend has not changed?

藏色散人
Release: 2020-01-04 09:26:38
Original
1821 people have browsed it

What should I do if the DEDE backend has updated ads but the frontend has not changed?

What should I do if the DEDE backend updates ads but the frontend has no changes?

The solution to the problem that DreamWeaver DEDE has updated the advertisement in the backend but the front desk has not changed

Recommended study:梦Weavercms

Many friends are here After modifying the advertising code in the backend, the ads in the frontend have not changed. This reason is a caching problem.

Solution suitable for novices:

If you modify the advertising code, then we find the management on the right. There are 3 options under the management, [JS] [Change] [Delete] , these 3, now we only need to click JS, here is the preview of this JS ad, and then we go back to the front desk to see if the ad changes automatically?

Comprehensive solution:

In addition, when previewing every time, we need to make the following modifications to the advertising module. The following are posted by friends on the forum You can refer to the following methods to solve it.

After installing the advertising module that comes with DedeCms, I found that after modifying the advertising information, the advertisement called by the front desk still had the previous modified information. I checked the source code and found that the cache was called, but the ad_edit of DedeCMS. php edited and saved the information without deleting the original cache. The modifications here are as follows:

Open the file dede/ad_edit.php and find the following code:

$dsql->ExecuteNoneQuery($query);
ShowMsg("成功更改一则广告代码!",$ENV_GOBACK_URL);
Copy after login

Modify to the following code :

$dsql->ExecuteNoneQuery($query);
// 删除广告缓存文件 begin
// dedecms V57_GBK 2011-08-12
if(file_exists(DEDEDATA."/cache/myad-$aid.htm")){
@unlink(DEDEDATA."/cache/myad-$aid.htm");
}
// 删除广告缓存文件 end
ShowMsg("成功更改一则广告代码!",$ENV_GOBACK_URL);
Copy after login

The above is the detailed content of What should I do if the DEDE backend has updated ads but the frontend has not changed?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!