Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hacer print_r de los $_REQUEST ($_POST y $_GET) #2271

Open
cogare84 opened this issue Mar 2, 2022 · 4 comments
Open

hacer print_r de los $_REQUEST ($_POST y $_GET) #2271

cogare84 opened this issue Mar 2, 2022 · 4 comments

Comments

@cogare84
Copy link

cogare84 commented Mar 2, 2022

Hola.
Quisiera poder hacer un print_r de los arrays que envia y maneja jTable . Cuando intento hacerlo en el controlador de jTable, da un error de comunición con el servidor y no puedo verlos. Si alguien puede echarme una mano, se agradece

Saludos

@misterparsons
Copy link

JTable is expecting a well formatted json object from php for example

$r['Result'] = "OK";
$r['Records'] = $records;
echo json_encode($r);

While you debugging your code you can return extra data that will be ignored by jTable which you can use the Web Developer features of a browser to view. For example

$r['GET'] = $_GET;
$r['POST'] = $_POST;

However both post and get parameters can also be seen in the browser viewer, without needing to add any server code, but the technique may help with interim results, when non-trivial server operations are required.

@cogare84
Copy link
Author

cogare84 commented Mar 3, 2022

En primer lugar, gracias por el apunte. Entiendo la parte donde indicas devolver datos adicionales, en mi caso:

$jTableResult ['POST'] = $_POST;
print json_encode ($jTableResult);

pero lo que no consigo es verlo en la herramienta para desarrollador del navegador. He mirado en los distintos apartados de dicha herramienta
image

pero no consigo encontrar dichos datos. si puedes indicarme como puedo verlo, te lo agradezco.
Gracias de nuevo y un saludo

@misterparsons
Copy link

What browser do you use?

@cogare84
Copy link
Author

cogare84 commented Mar 7, 2022

Hola.
El que suelo usar es chrome (Versión 98.0.4758.102), pero me valdría cualquier otro.
Gracias y un saludo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants