search
HomeCMS TutorialDEDECMSHow to modify the keyword length in Dede

How to modify the keyword length in Dede

Dec 10, 2019 am 10:04 AM
dream weaving

How to modify the keyword length in Dede

织梦dede怎么修改关键字长度?

在网站的制作中,很多时候dede默认的一些设置可能无法达到我们要求,就如dede关键字长度一样,无法达到我们的要求,如果想修改到我们所需要的长度的话,需要修改一些php文件及数据库

推荐学习:织梦cms

  

dede文件修改默认关键字长度

第1步:找到并打开dede后台目录下的article_edit.php和article_add.php文件。

电脑维修技术网注:如果是修改专题认关键字的话,需要修改spec_add.php和spec_edit.php文件。

第2步:在文件中搜索"keywords",找到“$keywords = trim(cn_substrR($keywords, 60));”这行代码,修改为$keywords = $keywords;并保存。

数据库关键字默认长度修改

默认dede的keywords关键字数据库类型为char长度也只有20,所以我们需要把这个数据库字段类型改成varchar长度也改成200.

第1步:成功登录到dede后台,或是使用工具软件什么的连接到mysql数据库。

第2步:找到dede数据库,执行以下代码。

代码如下:

ALTER TABLE dede_archives MODIFY COLUMN keywords VARCHAR(200); 
以上SQL语句说明,dede_archives为dede表名。keywords为需要修改的字段名。
ALTER TABLE 表名 MODIFY COLUMN 字段名 数据类型;

The above is the detailed content of How to modify the keyword length in Dede. For more information, please follow other related articles on the PHP Chinese website!

Statement
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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.