本身迅睿有查询标题是否重复的功能。不需要单独二次开发,本教程主要针对部分功能二次开发和新应用。
\Phpcmf\Hooks::on('module_content_before', function ($data) { $rt = \Phpcmf\Service::M()->table_site(MOD_DIR, SITE_ID)->where('title', $data[1]['title'])->getRow(); if($rt) dr_exit_msg(0, '标题重复'); return $data; });
本文属原创,转载请注明原文:https://www.zhimatong.com/jiaocheng/865.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。