PDO errors not showing when php file accessed by ajax -


i have php file uses pdo access sql. using ajax run php script. like, (on button click ajax function). when run through ajax, pdo errors don't show. however, if run php file without ajax, errors reported fine. example if go directly php url.

my question is, how stop php script , display errors, when accessed ajax.

die() not work.

i don't want echo error through ajax, want entire script die, , echo error.

thanks

the error page getting returned, being returned javascript, not browser window.

most the ajax call not interpreting error because page status 200, i.e, php error page valid html, if isn;t supposed returned.

two options.

  1. don't ajax call until you've got sorted. if get pretty simple, plug address in browser window , see outputting.
  2. if can't/don't want turn off ajax call, in dev tools in browser, can see resources being returned (in chrome network tab example), show output.

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -