在 TinyMCE 中保存内容时出现 HTTP 错误 405.0
HTTP Error 405.0 while saving content in TinyMCE
我想知道为什么在 TinyMCE:s 编辑器中保存内容时,我总是收到错误消息“HTTP 错误 405.0 - 方法不允许
您正在寻找的页面无法显示,因为正在使用无效的方法(HTTP 动词)。”这是我的代码:
HTML:
<form method="get">
<textarea id="mytextarea">This is an implementation of TinyMCE in an Angular application.</textarea>
<button name="submitbtn"></button>
</form>
JavaScript:
tinymce.init({
selector: '#mytextarea',
plugins: [
"advlist autolink lists link image charmap print preview anchor", // tillägg av plugins line fick
"searchreplace visualblocks code fullscreen", // Insert, Table och Tools menyer att dyka upp
"insertdatetime media table contextmenu paste",
"save", /*HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.*/
//'codemirror'
],
toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code | save'
});
提前致谢!
最好的问候,阿提拉
虽然可以使用 GET 方法提交表单,但(通常)应使用 HTTP POST(而非 GET)提交表单。例如:
<form method="post" action="URLToSendFileTo.php">
...
</form>
(使用 GET 提交对您可以提交的内容量有限制,并且表单内容成为 URL 的一部分,这在很多情况下都是不希望的)
使用表单标签时,您需要提供一个 action
属性,以便页面知道它应该 post 信息的位置。
此页面提供了有关 <form>
标记及其选项的更多详细信息:http://www.w3schools.com/tags/att_form_method.asp
附带说明...您可能需要在开发中使用 5 个基本的 HTTP 动词。可以在此处找到有关每种通常如何使用的简要概述:
我想知道为什么在 TinyMCE:s 编辑器中保存内容时,我总是收到错误消息“HTTP 错误 405.0 - 方法不允许 您正在寻找的页面无法显示,因为正在使用无效的方法(HTTP 动词)。”这是我的代码:
HTML:
<form method="get">
<textarea id="mytextarea">This is an implementation of TinyMCE in an Angular application.</textarea>
<button name="submitbtn"></button>
</form>
JavaScript:
tinymce.init({
selector: '#mytextarea',
plugins: [
"advlist autolink lists link image charmap print preview anchor", // tillägg av plugins line fick
"searchreplace visualblocks code fullscreen", // Insert, Table och Tools menyer att dyka upp
"insertdatetime media table contextmenu paste",
"save", /*HTTP Error 405.0 - Method Not Allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.*/
//'codemirror'
],
toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code | save'
});
提前致谢!
最好的问候,阿提拉
虽然可以使用 GET 方法提交表单,但(通常)应使用 HTTP POST(而非 GET)提交表单。例如:
<form method="post" action="URLToSendFileTo.php">
...
</form>
(使用 GET 提交对您可以提交的内容量有限制,并且表单内容成为 URL 的一部分,这在很多情况下都是不希望的)
使用表单标签时,您需要提供一个 action
属性,以便页面知道它应该 post 信息的位置。
此页面提供了有关 <form>
标记及其选项的更多详细信息:http://www.w3schools.com/tags/att_form_method.asp
附带说明...您可能需要在开发中使用 5 个基本的 HTTP 动词。可以在此处找到有关每种通常如何使用的简要概述: