I want to create a PHP webservice : there are only functions which return values from a MySQL database column values within this PHP file , there is no html tag. So what should be the value to set with the Content-Type in this code : header('Content-Type: xxx; charset=UTF-8'); ?
I want to create a PHP webservice : there are only functions which return
Share
text/plainif it’s plain texttext/csvif it’s in CSV formatapplication/jsonif it’s JSONapplication/xmlif it’s XMLFor a “web service”, you should look into using one of the latter two.