Skip to content

Instantly share code, notes, and snippets.

@easychen
Last active September 11, 2018 08:23
Show Gist options
  • Save easychen/c53534f65a7f2cb2e46b4e98816c968c to your computer and use it in GitHub Desktop.
Save easychen/c53534f65a7f2cb2e46b4e98816c968c to your computer and use it in GitHub Desktop.
PHP 跨域Header
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: origin, x-requested-with, content-type');
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment