wangeditor가 백엔드에 값을 전달할 수 없습니다
P粉021180371
P粉021180371 2022-11-19 23:33:09
0
1
794

안녕하세요 선생님, wangeditor를 소개하기 위해 tp6 프레임워크를 사용하지만 편집 콘텐츠의 값을 백엔드에 전달할 수 없습니다. 분석을 도와주실 수 있나요?

html:

<form class="form-horizontal" role="form" enctype="multipart/form-data" method="post" action="/index.php/admin/article/artadd"> ; <div class="form-group"> <label for="title" class="col-sm-2 control-label">title</label> 10"> <input type="text" class="form-control" id="title" name="title" placeholder="제목을 입력하세요" > </div> </div>

<div id="editor—wrapper" name="content"> <div id="toolbar-container" ><!-- 툴바--></div> "편집기-컨테이너" > <!-- 편집기-></div> <div class="col-md-2 col-md-offset-9"< 버튼 유형="제출" class="btn btn-default" style="float: right;" onclick="save();">저장</button>; </form>

js code

function save(){ var data = new Object; data.content = editor.getHtml() // if (content =='') {} $.post ('/index.php/admin/article/artadd',data,function(res){ },'json'); Alert(data.content) }

백엔드 코드

public function artadd() //두 개가 서로 다른 시간에 실행되도록 판단 추가 if (Request::isPost()) { $title = input('post.title'); $cid = input('post.cid'); = time(); $content = htmlspecialchars(input('post.content')); $status = input('post. hot '); $himg = input('post.himg'); $cimg = input('post.cimg'); // $picurl = input('post.picurl'); 001.jpg $ file = request ()-& gt ( 'picurl'); file ( 'picurl'); ,'msg'=> [ '제목' => $cid, 'content' =>$content, 'hot' => $himg, 'cimg' = >

P粉021180371
P粉021180371

모든 응답(1)
autoload

네트워크에서 요청을 확인하세요

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!