迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
请教前端怎么往custom.php里传参数呀,要做个根据不同参数来写入不同值的cookie,function标签无法满足需求,表单提交传参数的action地址应该是哪呢?
{php $cookie_theme = \Phpcmf\Service::L('input')->get_cookie('my_theme');} {if $cookie_theme == 'green' || empty($cookie_theme)} <link rel="stylesheet" href="{HOME_THEME_PATH}css/minimalist-green.css"> {elseif $cookie_theme == 'blue'} <link rel="stylesheet" href="{HOME_THEME_PATH}css/minimalist-blue.css"> {elseif $cookie_theme == 'red'} <link rel="stylesheet" href="{HOME_THEME_PATH}css/minimalist-red.css"> {elseif $cookie_theme == 'gray'} <link rel="stylesheet" href="{HOME_THEME_PATH}css/minimalist-gray.css"> {/if}
function my_theme_cookie($value) { \Phpcmf\Service::L('input')->set_cookie('my_theme', $value, '8640000'); }