Javascript jQuery加载缺少参数

Javascript jQuery加载缺少参数,javascript,php,jquery,jquery-load,Javascript,Php,Jquery,Jquery Load,我有这样的代码 function firstload(maxid, next_page, results, animation_image, btn_load, url, endpoint) { var a = ''+maxid+''; var b = ''+next_page+''; var c = ''+endpoint+''; $('#'+results+'').load('<?php echo base_url()?

我有这样的代码

function firstload(maxid, next_page, results, animation_image, btn_load, url, endpoint) {
        var a = ''+maxid+'';
        var b = ''+next_page+'';
        var c = ''+endpoint+'';

        $('#'+results+'').load('<?php echo base_url()?>create/firstload', { max_id: a, next_page: b, endpoint: c }, function() { 
            var nextpage = $('#'+next_page+'').val();
            if (nextpage != 0) { $('.'+btn_load+'').show(); }
            else {  $('.'+btn_load+'').hide();  }
            $('.'+animation_image+'').hide();
        });
    }

firstload('max_id','nextpage','results','animation_image','load_more','load','get_user_recent');
论点2和论点3也是如此


我的代码怎么了

在要作为php运行的代码周围放置
标记。看起来您在调用
firstload(…)
时缺少了这些标记,在希望作为php运行的代码周围放置
标记。看起来您在调用
firstload(…)

时缺少了这些标记。当您查看网络请求时,会看到什么?这是一个PHP错误-您需要确保调用中包含所有参数。您使用的是PHP框架吗?如何将参数传递给
创建
控制器中的
firstload
函数?
load()
post
对象传递给您的数据。我怀疑您不希望在serverLine number上看到帖子:156是“函数firstload($max\u id,$next\u page,$endpoint)”。所以我认为前端的变量没有传递到后端。当您查看网络请求时,您会看到什么?这是一个PHP错误-您需要确保调用中包含所有参数。您使用的是PHP框架吗?如何将参数传递给
创建
控制器中的
firstload
函数?
load()
post
对象传递给您的数据。我怀疑您不希望在serverLine number上看到帖子:156是“函数firstload($max\u id,$next\u page,$endpoint)”。所以我认为前端的变量没有传递到后端。你混淆了同名的javascript方法和php方法你混淆了同名的javascript方法和php方法
function firstload($max_id, $next_page, $endpoint) {
 echo '<p> '$max_id' </p> //just a piece of code
}
Severity: Warning
Message: Missing argument 1 for Create::firstload()
Filename: controllers/Create.php
Line Number: 156