Thinkphp--ajax 's URL problem?

How does the URL in

XmlHttpRequest.open () write the code in the
controller as follows:
public function check () {

    $name = array("eq",I("get.name"));
    $user = D("User");
    $result = $user->field("name")->where($name)->find();
    if($result>0){
        return true;
    }else{
        return false;
    }
}

is it written like this in URL: {U: ("Home/User/check")}?

Mar.22,2021

if you are in a template file, you can use {: U ('.')}
if you are in a separate js file, you can consider putting url into the attributes of an element. Take out url from js and use


you can use U method to generate a link in a js variable and put it in the header head of the page, so you can use

in all pages.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb2040-48174.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb2040-48174.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?