Fetch Api unable to get Session from PHP server

╄→尐↘猪︶ㄣ 提交于 2019-12-01 17:35:31

If you want fetch to send cookies, you have to provide the credentials option.

See https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch#Parameters for details.

jquery ajax is a usual ajax request and the browser is sending the cookie header with the session id that identify your session.

fetch doesnt - instead a new session is created with out any data send the php session id either with url or header

have a look at: http://php.net/manual/en/session.idpassing.php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!