My Wi-Fi was working but it is connected now but can't access anything like safari?

Hello i'm using iphone 5s and i'm connected with my Wi-Fi but every device is working on internet but my iphone not working when i open safari and search anything it says "Safari can't open the page because your iphone is not connect to the internet" and i was using this Wi-Fi in my iphone yesterday but its not working now what's the problem?

Turn Wi-Fi off and on a few times. Turn the phone off for an hour while the internet is off.

Check that the time and date on your phone hasn't drifted off.