English 中文(简体)
Ajax。 难道不能在新档案中再次使用我的舱面。
原标题:Ajax. Is it possible to not use mysql_query again in a new file?

When I use ajax, I have to use mysql_query again to get information in that file which is for ajax. Can I do action without mysql_query like with include();? Ask if you don t understand, because I guess I asked not very properly.

<>strong>edited: 当我试图查阅Ajax案卷时,我不得不再次检索各位成员的资料。 因此,我的问题是,能否避免这种情况?

最佳回答

结合内容谈判和教学,例如

Controller
    Action
        // check if query is cached
        if(!Cache->hasSaved(Query))
            Result = Query->run
            Cache->save(Result)
        else
            Result = Cache->getSaved(Query)

        // check if Request was done via Ajax
        if(Request->isAjax)
            View->disableLayout
            View->set(JSON->encode(Result))
        else
            View->set(Result)

如同,Ignacio解释说,对服务器的每项申请都是孤立的。 PHP有一个“共享任何结构,因此,你可以做的唯一事情是防止再次开问。 内容谈判只是帮助利用同样的问题,并根据不同要求,将其退回,因此,你打算为阿贾克斯岛设立一个主计长行动,并安排定期电话。

问题回答

每一次使用服务器上的PHP页面都是孤立的行动。 除非会议等明确注明日期,否则不得将结果列入附件。

您可以实施一个ach层,即: rel=“nofollow noretinger”>APC,这将使你能够储存关键数据库成果,使你能够查阅随后的电话。





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签