phpcms 允许英文目录有空格
大家都用过phpcm添加栏目吧,在添加栏目里面,有个选项是 英文目录,这里目录可以用作伪静态功能。这么英文不能有空格等特殊字符。但是如果页面中需要引用包含空格的字符呢,例如,关于我们页面,我要显示英文about us。那么怎么处理呢
第一步:打开下面文件
phpcms\modules\admin\templates\category_add.tpl.php
phpcms\modules\admin\templates\category_edit.tpl.php
phpcms\modules\admin\templates\category_page_add.tpl.php
phpcms\modules\admin\templates\category_page_edit.tpl.php
这四个模板文件,分别对应后台的,添加栏目,修改栏目,添加单网页,修改单网页
第二步:
找到表单验证的字段,修改就可以了
regexValidator({regexp:"^([a-zA-Z0-9、-]|[_]){0,30}$ 替换成 regexValidator({regexp:"^([a-zA-Z0-9、-]|[_]|[ ]){0,30}$
这样就可以了
生活不易,码农辛苦
如果您觉得本文的内容对您的学习有所帮助,可以手机扫描二维码进行捐赠

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

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.

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.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1
Powerful PHP integrated development environment
