Answer the question
In order to leave comments, you need to log in
Why doesn't the try catch construct work?
I can't figure out why the try catch at the entry point doesn't work! Here is the source itself
. Through the passed url, I connect the necessary controller in the autolode, I set a check if! file_exists, then we catch an exception, the whole point is that this code works until I pass something like this in the url ( localhost/For_nout/ oop_blog/ssdsd---), and if, for example, I write in the url like this ( localhost/For_nout/oop_blog/ssdsd), then the exception is triggered. Thanks in advance, I don’t know what’s the catch here, I’ll be glad to discuss this topic!
Answer the question
In order to leave comments, you need to log in
if !file_exists, then we catch an exception
Because you're trying to upload a file that doesn't exist anyway. Throw an exception and then try to load the file even though it exists. And you are trying to handle the exception after spl_auto_load_register.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question