dimanche 28 avril 2019

Result of adding two numbers in Javascript is wrong on apache but not with artisan server

I've found a weird behavior of a site that I'm developing. It is being developed using Laravel 5.8 and uses the React preset to build all the front end. This project has a section of stats, and in some of them you need to show a total field. When I use the php artisan serve to run my project, and access the stats, the results are displayed and calculated correctly. The problem comes when I deploy this site on Apache using AMPPS. When I do this, the total is calculated as a string, so for example, if I have a sum of 1+0, instead of get a 1, I'm getting a 10. It is concatenating the integers as strings.

This is the result when I'm using the php artisan serve This is the result when I'm using the <code>php artisan serve</code>

And this one when I use apache: And this one when I use apache

Why this behaviour only happens when I'm using apache as server?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire