Error[2]: fopen(C:\phpStudy\bbs/./tmp/model_misc.func.php): failed to open stream: Invalid argument, File: C:\phpStudy\bbs\xiunophp\misc.func.php, Line: 980
File: C:\phpStudy\bbs\xiunophp\misc.func.php, Line: 980, fopen(C:\phpStudy\bbs/./tmp/model_misc.func.php , wb)
File: C:\phpStudy\bbs\model\plugin.func.php, Line: 33, file_put_contents_try(C:\phpStudy\bbs/./tmp/model_misc.func.php , array('login', 'create', 'logout', 'sendinitpw', 'resetpw', 'resetpw_sendcode', 'resetpw_complete', 'synlogin') ); if($gid == 1) return; $param0 = param(0); $param1 = param(1); if($param0 == 'user' && in_array($param1, array('login', 'create', 'logout', 'sendinitpw', 'resetpw', 'resetpw_sendcode', 'resetpw_complete', 'synlogin'))) return; if($conf['runlevel']==3) //会员可读写 { message(0, "请点击右上角登录/注册会员,免费查看本站所有内容。
"); } if($gid == 1) return; $param0 = param(0); $param1 = param(1); foreach ($rules as $route=>$actions) { if($param0 == $route && (empty($actions) || in_array($param1, $actions))) { return; } } switch ($conf['runlevel']) { case 0: message(-1, $conf['runlevel_reason']); break; case 1: message(-1, lang('runlevel_reson_1')); break; case 2: ($gid == 0 || $method != 'GET') AND message(-1, lang('runlevel_reson_2')); break; case 3: $gid == 0 AND message(-1, lang('runlevel_reson_3')); break; case 4: $method != 'GET' AND message(-1, lang('runlevel_reson_4')); break; //case 5: break; } } /* message(0, '登录成功'); message(1, '密码错误'); message(-1, '数据库连接失败'); code: < 0 全局错误,比如:系统错误:数据库丢失连接/文件不可读写 = 0 正确 > 0 一般业务逻辑错误,可以定位到具体控件,比如:用户名为空/密码为空 */ function message($code, $message, $extra = array()) { global $ajax, $header, $conf; $arr = $extra; $arr['code'] = $code.''; $arr['message'] = $message; $header['title'] = $conf['sitename']; // 防止 message 本身出现错误死循环 static $called = FALSE; $called ? exit(xn_json_encode($arr)) : $called = TRUE; if($ajax) { echo xn_json_encode($arr); } else { if(IN_CMD) { if(is_array($message) || is_object($message)) { print_r($message); } else { echo $message; } exit; } else { if(defined('MESSAGE_HTM_PATH')) { include _include(MESSAGE_HTM_PATH); } else { include _include(APP_PATH."view/htm/message.htm"); } } } exit; } // 上锁 function xn_lock_start($lockname = '', $life = 10) { global $conf, $time; $lockfile = $conf['tmp_path'].'lock_'.$lockname.'.lock'; if(is_file($lockfile)) { // 大于 $life 秒,删除锁 if($time - filemtime($lockfile) > $life) { xn_unlink($lockfile); } else { // 锁存在,上锁失败。 return FALSE; } } $r = file_put_contents($lockfile, $time, LOCK_EX); return $r; } // 删除锁 function xn_lock_end($lockname = '') { global $conf, $time; $lockfile = $conf['tmp_path'].'lock_'.$lockname.'.lock'; xn_unlink($lockfile); } // class xn_html_safe 由 axiuno@gmail.com 编写 include_once XIUNOPHP_PATH.'xn_html_safe.func.php'; function xn_html_safe($doc, $arg = array()) { empty($arg['table_max_width']) AND $arg['table_max_width'] = 746; // 这个宽度为 bbs 回帖宽度 $pattern = array ( //'img_url'=>'#^(https?://[^\'"\\\\<>:\s]+(:\d+)?)?([^\'"\\\\<>:\s]+?)*$#is', 'img_url'=>'#^(((https?://[^\'"\\\\<>:\s]+(:\d+)?)?([^\'"\\\\<>:\s]+?)*)|(data:image/png;base64,[\w\/+]+))$#is', 'url'=>'#^(https?://[^\'"\\\\<>:\s]+(:\d+)?)?([^\'"\\\\<>:\s]+?)*$#is', // '#https?://[\w\-/%?.=]+#is' 'mailto'=>'#^mailto:([\w%\-\.]+)@([\w%\-\.]+)(\.[\w%\-\.]+?)+$#is', 'ftp_url'=>'#^ftp:([\w%\-\.]+)@([\w%\-\.]+)(\.[\w%\-\.]+?)+$#is', 'ed2k_url'=>'#^(?:ed2k|thunder|qvod|magnet)://[^\s\'\"\\\\<>]+$#is', 'color'=>'#^(\#\w{3,6})|(rgb\(\d+,\s*\d+,\s*\d+\)|(\w{3,10}))$#is', 'safe'=>'#^[\w\-:;\.\s\x7f-\xff]+$#is', 'css'=>'#^[\(,\)\#;\w\-\.\s\x7f-\xff]+$#is', 'word'=>'#^[\w\-\x7f-\xff]+$#is', ); $white_tag = array('a', 'b', 'i', 'u', 'font', 'strong', 'em', 'span', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'tfoot','caption', 'ol', 'ul', 'li', 'dl', 'dt', 'dd', 'menu', 'multicol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'p', 'div', 'pre', 'br', 'img', 'area', 'embed', 'code', 'blockquote', 'iframe', 'section', 'fieldset', 'legend' ); $white_value = array( 'href'=>array('pcre', '', array($pattern['url'], $pattern['ed2k_url'])), 'src'=>array('pcre', '', array($pattern['img_url'])), 'width'=>array('range', '', array(0, 4096)), 'height'=>array('range', 'auto', array(0, 80000)), 'size'=>array('range', 4, array(-10, 10)), 'border'=>array('range', 0, array(0, 10)), 'family'=>array('pcre', '', array($pattern['word'])), 'class'=>array('pcre', '', array($pattern['safe'])), 'face'=>array('pcre', '', array($pattern['word'])), 'color'=>array('pcre', '', array($pattern['color'])), 'alt'=>array('pcre', '', array($pattern['safe'])), 'label'=>array('pcre', '', array($pattern['safe'])), 'title'=>array('pcre', '', array($pattern['safe'])), 'target'=>array('list', '_self', array('_blank', '_self')), 'type'=>array('pcre', '', array('#^[\w/\-]+$#')), 'allowfullscreen'=>array('list', 'true', array('true', '1', 'on')), 'wmode'=>array('list', 'transparent', array('transparent', '')), 'allowscriptaccess'=>array('list', 'never', array('never')), 'value'=>array('list', '', array('#^[\w+/\-]$#')), 'cellspacing'=>array('range', 0, array(0, 10)), 'cellpadding'=>array('range', 0, array(0, 10)), 'frameborder'=>array('range', 0, array(0, 10)), 'allowfullscreen'=>array('range', 0, array(0, 10)), 'align'=>array('list', 'left', array('left', 'center', 'right')), 'valign'=>array('list', 'middle', array('middle', 'top', 'bottom')), 'name'=>array('pcre', '', array($pattern['word'])), ); $white_css = array( 'font'=>array('pcre', 'none', array($pattern['safe'])), 'font-style'=>array('pcre', 'none', array($pattern['safe'])), 'font-weight'=>array('pcre', 'none', array($pattern['safe'])), 'font-family'=>array('pcre', 'none', array($pattern['word'])), 'font-size'=>array('range', 12, array(6, 48)), 'width'=>array('range', '100%', array(1, 1800)), 'height'=>array('range', '', array(1, 80000)), 'min-width'=>array('range', 1, array(1, 80000)), 'min-height'=>array('range', 400, array(1, 80000)), 'max-width'=>array('range', 1800, array(1, 80000)), 'max-height'=>array('range', 80000, array(1, 80000)), 'line-height'=>array('range', '14px', array(1, 50)), 'color'=>array('pcre', '#000000', array($pattern['color'])), 'background'=>array('pcre', 'none', array($pattern['color'], '#url\((https?://[^\'"\\\\<>]+?:?\d?)?([^\'"\\\\<>:]+?)*\)[\w\s\-]*$#')), 'background-color'=>array('pcre', 'none', array($pattern['color'])), 'background-image'=>array('pcre', 'none', array($pattern['img_url'])), 'background-position'=>array('pcre', 'none', array($pattern['safe'])), 'border'=>array('pcre', 'none', array($pattern['css'])), 'border-left'=>array('pcre', 'none', array($pattern['css'])), 'border-right'=>array('pcre', 'none', array($pattern['css'])), 'border-top'=>array('pcre', 'none', array($pattern['css'])), 'border-left-color'=>array('pcre', 'none', array($pattern['css'])), 'border-right-color'=>array('pcre', 'none', array($pattern['css'])), 'border-top-color'=>array('pcre', 'none', array($pattern['css'])), 'border-bottom-color'=>array('pcre', 'none', array($pattern['css'])), 'border-left-width'=>array('pcre', 'none', array($pattern['css'])), 'border-right-width'=>array('pcre', 'none', array($pattern['css'])), 'border-top-width'=>array('pcre', 'none', array($pattern['css'])), 'border-bottom-width'=>array('pcre', 'none', array($pattern['css'])), 'border-bottom-style'=>array('pcre', 'none', array($pattern['css'])), 'margin-left'=>array('range', 0, array(0, 100)), 'margin-right'=>array('range', 0, array(0, 100)), 'margin-top'=>array('range', 0, array(0, 100)), 'margin-bottom'=>array('range', 0, array(0, 100)), 'margin'=>array('pcre', '', array($pattern['safe'])), 'padding'=>array('pcre', '', array($pattern['safe'])), 'padding-left'=>array('range', 0, array(0, 100)), 'padding-right'=>array('range', 0, array(0, 100)), 'padding-top'=>array('range', 0, array(0, 100)), 'padding-bottom'=>array('range', 0, array(0, 100)), 'zoom'=>array('range', 1, array(1, 10)), 'list-style'=>array('list', 'none', array('disc', 'circle', 'square', 'decimal', 'lower-roman', 'upper-roman', 'none')), 'text-align'=>array('list', 'left', array('left', 'right', 'center', 'justify')), 'text-indent'=>array('range', 0, array(0, 100)), // 代码高亮需要支持,但是不安全! /* 'position'=>array('list', 'static', array('absolute', 'fixed', 'relative', 'static')), 'left'=>array('range', 0, array(0, 1000)), 'top'=>array('range', 0, array(0, 1000)), 'white-space'=>array('list', 'nowrap', array('nowrap', 'pre')), 'word-wrap'=>array('list', 'normal', array('break-word', 'normal')), 'word-break'=>array('list', 'break-all', array('break-all', 'normal')), 'display'=>array('list', 'block', array('block', 'table', 'none', 'inline-block', 'table-cell')), 'overflow'=>array('list', 'auto', array('scroll', 'hidden', 'auto')), 'overflow-x'=>array('list', 'auto', array('scroll', 'hidden', 'auto')), 'overflow-y'=>array('list', 'auto', array('scroll', 'hidden', 'auto')), */ ); $safehtml = new HTML_White($white_tag, $white_value, $white_css, $arg); $result = $safehtml->parse($doc); return $result; } ?>)
File: C:\phpStudy\bbs\tmp\model.inc.php, Line: 39, _include(C:\phpStudy\bbs/model/misc.func.php)
File: C:\phpStudy\bbs\index.php, Line: 51, include(C:\phpStudy\bbs\tmp\model.inc.php)
Error[2]: Cannot modify header information - headers already sent by (output started at C:\phpStudy\bbs\xiunophp\misc.func.php:50), File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 69
File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 69, setcookie(cookie_test , dsvEpfscl8DLO5pS4k7Q7DTt5AV9D_2B0WlTL_2BRdCfH9eqGsbT , 1772712958 , )
File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 41, sess_new(824dk72ih3g885off1ma2kg1m6)
File: , Line: , sess_read(824dk72ih3g885off1ma2kg1m6)
File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 210, session_start()
File: C:\phpStudy\bbs\tmp\index.inc.php, Line: 7, sess_start()
File: C:\phpStudy\bbs\index.php, Line: 52, include(C:\phpStudy\bbs\tmp\index.inc.php)
Error[2]: session_start(): Cannot send session cookie - headers already sent by (output started at C:\phpStudy\bbs\xiunophp\misc.func.php:50), File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 210
File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 210, session_start()
File: C:\phpStudy\bbs\tmp\index.inc.php, Line: 7, sess_start()
File: C:\phpStudy\bbs\index.php, Line: 52, include(C:\phpStudy\bbs\tmp\index.inc.php)
Error[2]: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\phpStudy\bbs\xiunophp\misc.func.php:50), File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 210
File: C:\phpStudy\bbs\tmp\model_session.func.php, Line: 210, session_start()
File: C:\phpStudy\bbs\tmp\index.inc.php, Line: 7, sess_start()
File: C:\phpStudy\bbs\index.php, Line: 52, include(C:\phpStudy\bbs\tmp\index.inc.php)
修车车
影子论坛 测试
发新帖
修车车
交流讨论

Processed Time:3.4295859336853