我有2台不同的服务器机器,它生成响应的代码相同:
public virtual async Task<ActionResult> CreatePrfile(CreateFreelancerProfileViewModel viewModel, bool isFirst, HttpPostedFileBase image)
public class CreateFreelancerProfileViewModel : BaseViewModel
{
#region Collocations
public ExternalProjectViewModel[] ExternalProjects { get; set; }
public CertificateUniverSityViewModel[] CertificateUniverSitys { get; set; }
public CertificateInstitutionsViewModel[] CertificateInstitutions { get; set; }
public SoicalViewModel Soical { get; set; }
#endregion
}
"role_options": [
{
"usrl_id": 25,
"usrl_enabled": "DISABLE",
"usrl_level": "STAFF",
"csms_id": 2,
"csms_name": "EAST MALL - GRAND INDONESIA",
"rlms_id": 20,
"rlms_name": "Administrative",
"drms_id": 2,
"drms_name": "South Lobby"
},
我使用laravel 5.x,如果你看到第一个服务器自动转换为整数,其他服务器仍然转换为字符串。 ("role_options": [
{
"usrl_id": "25",
"usrl_enabled": "DISABLE",
"usrl_level": "STAFF",
"csms_id": "2",
"csms_name": "EAST MALL - GRAND INDONESIA",
"rlms_id": "20",
"rlms_name": "Administrative",
"drms_id": "2",
"drms_name": "South Lobby"
},
)
如何使其自动转换为整数? 第一台服务器是ngingX&amp; localhost使用php 7.0 mySQL
第二台服务器是Apache使用php 7.0 Maria DB