I want to write the framework myself. how can I determine the defined functions in the controller? Let's say {code...} in the C controller and then enter the address index. phpc? Cpage & amp; aindex can be opened if index. phpc is not input illegally? Cpage & amp; aindex2 or index. phpc? Cpage & amp; ax... I want to write the framework myself. how can I determine the function defined in the controller?
For example
Class PageController {function index () {echo "single page ";}
Then enter the address index. phpc? C = page & a = index can be opened
If index. phpc? C = page & a = index2 or index. phpc? C = page & a = xxxx
The error message "Fatal error: Call to undefined method PageController: xxx ()" is returned for the function definition function ()
I want to achieve this. how can I determine whether a function or method does not exist and directly jump to 404?
function ???() { echo "404";}
Reply content:
I want to write the framework myself. how can I determine the defined functions in the controller?
For example
Class PageController {function index () {echo "single page ";}
Then enter the address index. phpc? C = page & a = index can be opened
If index. phpc? C = page & a = index2 or index. phpc? C = page & a = xxxx
The error message "Fatal error: Call to undefined method PageController: xxx ()" is returned for the function definition function ()
I want to achieve this. how can I determine whether a function or method does not exist and directly jump to 404?
function ???() { echo "404";}