PHP Undefined Index When Checking Cookie Value And Cookie Exists
问题 I know to check for the existence of a cookie before I try to use it, but in this case If I set a cookie and then try to use it immediately afterwards without checking, the code works, however I get an "undefined index" warning in my php.log. The code below determines if the device is a computer or mobile and sets a cookie. It then checks the cookie value and if a mobile it redirects to a page. (If not, it will output a page and then show the content within a frame). <?php // Determine if