The frame used is thinkphp
I use AJAX to send a message to the background (cross-domain error, so I add the header (' access-control-allow-origin: * '), need to verify the SESSION but I found Var_export ($_session) ; It's empty.
Problem: 1, send to http://127.0.0.1/deno/index.php/Home/item/in http://localhost/deno/index.php/Home/Index/personal.html Delete.html in a project, why cross-domain issues occur
2, how to solve the problem of getting session data?
Reply content:
The frame used is thinkphp
I use AJAX to send a message to the background (cross-domain error, so I add the header (' access-control-allow-origin: * '), need to verify the SESSION but I found Var_export ($_session) ; It's empty.
Problem: 1, send to http://127.0.0.1/deno/index.php/Home/item/in http://localhost/deno/index.php/Home/Index/personal.html Delete.html in a project, why cross-domain issues occur
2, how to solve the problem of getting session data?
127.0.0.1 change to localhost.
How to solve the problem of cross-domain sending SessionID?