Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/242.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在joomla插件(而不是模块)中调用ajax帮助器_Php_Jquery_Ajax_Joomla - Fatal编程技术网

Php 如何在joomla插件(而不是模块)中调用ajax帮助器

Php 如何在joomla插件(而不是模块)中调用ajax帮助器,php,jquery,ajax,joomla,Php,Jquery,Ajax,Joomla,我想在joomla插件中调用ajax到helper文件。我的文件夹结构是myplugin.php、myplugin.xml、helper.php、tmpl->default.php。我从default.php调用ajax,但它返回html。这是我的密码 jQuery.ajax({ type: "POST", url: "index.php?option=com_ajax&format=raw&plug

我想在joomla插件中调用ajax到helper文件。我的文件夹结构是myplugin.php、myplugin.xml、helper.php、tmpl->default.php。我从default.php调用ajax,但它返回html。这是我的密码

jQuery.ajax({
                    type: "POST",
                    url: "index.php?option=com_ajax&format=raw&plugin=myplugin",
                    data: {"Type": "insert"},
                    cache: false,
                    success: function (response)
                    {

请帮助解决我的错误。

请检查,但我使用的插件不是模块。当我将此代码用于模块时,它工作正常。