Php cross-domain problem

I use the laravel framework, the apach environment built by xampp,
header ("content-type:application:json;charset=utf8");

    header("Access-Control-Allow-Origin:*");
    header("Access-Control-Allow-Methods:POST");
    header("Access-Control-Allow-Headers:x-requested-with,content-type");
  

I added such a header header to the php code, but it didn"t work.
ask for advice!

Jul.18,2021

PHP is OK to write in this way, but it may not necessarily be a cross-domain problem. Check out the other files


which file is added specifically? Can the code be more detailed


Why not change the php of the js server since it is php,?


replace * in the code with the actual requester address. Referer Information

  

found the problem. The problem lies in the laravel framework, where header ('Access-Control-Allow-Origin:*'); is cross-domain in the native PHP language. You need to use the cors cross-domain plug-in in laravel

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ba13-4d949.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ba13-4d949.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?