2014-07-05 2 views
0

이 양식을 보내는 동안 '보았습니다 양식이 잘못되었습니다. 다시 제출하십시오. ' 오류 및 입력이 업데이트되지 않았습니다.구성 양식 phpbb

action = ''이 (가) 괜찮습니다. 제발, 중요한 부분을 PHP 코드의 중간 봐,이 영역의 문제를 찾을 수 없습니다.

<!-- INCLUDE overall_header.html --> 

<form id="wideoptions" action='' method='post'> 

<input type="wide_main" id="wide_main" name="config[wide_main]" size="30" value="{WIDE_MAIN}" /> 

<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> 

</form> 

PHP :

<?php 


global $db, $user, $auth, $template, $cache; 
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; 

define('IN_PHPBB', true); 
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; 
$phpEx = substr(strrchr(__FILE__, '.'), 1); 
include($phpbb_root_path . 'common.' . $phpEx); 

// Start session management 
$user->session_begin(); 
$auth->acl($user->data); 
$user->setup(); 

page_header('Wide Options'); 

$template->set_filenames(array(
    'body' => 'wide_options.html', 
)); 

// 중요한 부분은 add_form_key에 사용 된 이름과 일치하는 여기

 if (isset($_POST['submit'])) 
     { 
      if (!check_form_key('acp_widecpanel')) 
      { 
       trigger_error('FORM_INVALID'); 
      } 

      // request_var should be '' as it is a string ("1, 2, 3928") here, not an integer. 
      set_config('wide_main', request_var('wide_main', '0')); 

      trigger_error($user->lang['RT_SAVED'] . adm_back_link($this->u_action)); 
     } 











    $template->assign_vars(array(
      'WIDE_MAIN'  => $config['wide_main'], 
    )); 


page_footer(); 
?> 

답변