zoukankan      html  css  js  c++  java
  • phpcms v9 表单向导里添加图片字段,提示会话过期,请重新登陆

    用 phpcms v9 制作前端用户提交信息时,有个图片上传的栏目。

    如果注释 /phpcms/modules/attachment/attachment.php

    20//判断是否登录
    21		if(empty($this->userid)){
    22			showmessage(L('please_login','','member'));
    23		}


    88 if($this->isadmin==0 && !$grouplist[$this->groupid]['allowattachment']) showmessage(L('att_no_permission'));

     就可以上传.最后没有注释,在/phpcms/modules/formguide/index.php 添加

    class index {
    	private $db, $m_db, $M;
    	function __construct() {
    		$this->db = pc_base::load_model('sitemodel_model');
    		$this->m_db = pc_base::load_model('sitemodel_field_model');
    		$this->M = new_html_special_chars(getcache('formguide', 'commons'));
    		$this->siteid = intval($_GET[siteid]) ? intval($_GET[siteid]) : get_siteid();
    		$this->M = $this->M[$this->siteid];
    		$_SESSION['userid']='1';     //手动添加的,让attachment判断可以通过
    		$_SESSION['roleid']='1';  //手动添加的,让attachment判断可以通过
    	}
    
  • 相关阅读:
    GlowFilter发光效果
    投影滤镜的使用
    flash怎样删除库中没用的元件
    script中用php
    jQuery animate实现slideUp slideDown 的反向
    CSS !important 用法
    放新浪微博的箭头css写法
    json 取数据
    css hack 大全
    bubble 界面代码
  • 原文地址:https://www.cnblogs.com/linuxOS/p/3735423.html
Copyright © 2011-2022 走看看