I am trying to add a cookie in my add_cookie.php
file like so:
<?php
setcookie("TestCookie", 'epic_test', time()+3600);
exit('cookie set');
But when accessing https://my-site.com/add_cookie.php
I do see the "cookie set" text, but the cookie is not in fact set. Why is that? This code is straight from the documentation :)
I have also tried adding this code to functions.php
file of my theme and the result is the same.