저는 작업중인 Wordpress 플러그인에 대한 metabob에서 Zebra_form을 사용하려고합니다. 편의상wordpress 플러그인에서 zebra_form을 사용하는 중에 오류가 발생했습니다.
나는 이것에 코드 감소 :
public function render_metabox($post) {
// instantiate a Zebra_Form object
$form = new Zebra_Form('form');
// the label for the "email" field
$form->add('label', 'label_email', 'email', 'Email');
// add the "email" field
$obj = $form->add('text', 'email', '', array('autocomplete' => 'off'));
// auto generate output, labels above form elements
$form->render();
}
을하지만 그것을 실행하려고하면 나는 다음과 같은 오류가 발생합니다 :
Warning: Cannot modify header information - headers already sent by (output started at /Users/dp/Documents/SitesDev/wordpress/wp-admin/includes/template.php:1877) in /Users/dp/Documents/SitesDev/wordpress/wp-content/plugins/my-plugin/lib/Zebra/Zebra_Form.php on line 4052
Fatal error: The library tried to store the CSRF token in a cookie but was unable to do so because there was output already sent to the browser. You should either start a session prior to instantiating the library (recommended), have no output (including and tags, as well as any whitespace) sent to the browser prior to instantiating the library, or turn output buffering on in php.ini. in /Users/dp/Documents/SitesDev/wordpress/wp-content/plugins/my-plugin/lib/Zebra/Zebra_Form.php on line 4052
모든 단서? 또는 Zebra_form을이 방법으로 사용할 수 없습니까?
meatbox을 넣어해야? 그게 뭐야? – McNab
Meab metabox ... :) 수정되었습니다. – Daniel
D' oh. 나는 그것이 내가 들어 보지 못한 새로운 것이 었는지보기 위해 인터넷 검색을하고 있었다. Lol. 질문의 맥락에서 나는 깨달았어야했다. :) – McNab