Debug PHP script

0

I'm developing an Android app and in this app I make some access to the BD (MySQL - Hostinger) through calls, from within the Android code, to PHP files via browser.

But sometimes I have problems with the data that is being passed from Android to PHP and so I wanted to know if anyone knows how to debug these PHP files so I can find the possible problems.

That is when Android execute the PHP file link that is hosted on hostinger so I can debug this file.

Is it possible? or can I just debug this PHP locally?

    
asked by anonymous 21.02.2017 / 14:11

1 answer

0

If you enter this snippet in your code

ini_set('display_errors',1);
ini_set('display_startup_erros',1);
error_reporting(E_ALL);

PHP is forced to show system errors, so you can do the analysis.

    
21.02.2017 / 14:34