Create another php file under the TP5 controller directory. The request from the front end is less than 404.

<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
header("Content-type:text/html;charset=utf-8");
header("Access-Control-Allow-Origin: *");   //

class UserExit extends Controller
{ 
    public function UserExit(){
        ......
    }  
}
?>

as in the code above, the structure of Login.php and UserExit.php is similar.
the front-end access login can be accessed, and the access to userexit is reported to 404.
the newcomer has just used TP5. I may not understand the configuration. I wonder if this needs to be matched again.

clipboard.png

clipboard.png

May.31,2022

what is the running environment? windows the case of url does not matter, but if the system of Linux needs to pay attention to the case of your url , you need to write as: / index/userExit/userExit

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-1b3e4d7-4da9e.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-1b3e4d7-4da9e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?