How to solve cross domain issue in php

Add below on the top of the php page:

header(“Access-Control-Allow-Origin: *”);