Where in pkhp file to place this command?
header('Access-Control-Allow-Origin: *'); it is necessary to address to pkhp through $ .post
Where in pkhp file to place this command?
header('Access-Control-Allow-Origin: *'); it is necessary to address to pkhp through $ .post
Before the first content output. And where it depends on your architecture, framework, etc.
You can also use the check:
if (!headers_sent()) { header('Access-Control-Allow-Origin: *'); } else { // обработка ошибки или уведомление разработчикам } Uncaught SyntaxError: Unexpected token < index.html:2 - Mykola KіckiezUncaught SyntaxError: Unexpected token < index.html:2 - Mykola Kіketsphp code that needs to be inserted into php scripts. Are you familiar with PHP ? - korytoffSource: https://ru.stackoverflow.com/questions/482217/
All Articles