Where can I see what print_r display on PHP?

Francisco Romero

I have a REST API with Android and Slim framework. I'm using XAMPP to connect it with a MySQL database, .

I don't know where print_r is displayed.

The api.php file is in C:\Program Files\xampp\htdocs\project\app\api\api.php.

I get the following message when I try to access localhost/project/app/api/api.php:

Access denied.

It's a message that I put with define function. In index.php:

define("CONSTANT",true);

In connect.php and api.php:

if(!defined("CONSTANT")) die("Access denied");
Francisco Romero

Finally, testing different options during some hours, I get the solution.

If you are changing three values in your PUT method of your REST API, for example, name, description and idCar, after setting their new values (that you send from your Android application) you can put on your PHP script:

print_r([$name,$description,$idCar]);

Here all it's equals than before. So, how can you see what print_r it's displaying?

After executing your response on your Android application, you can put these two lines:

HttpEntity entity = response.getEntity();
String responseText = EntityUtils.toString(entity);

And then you can put a Log to see what it's displaying:

Log.d("response",responseText);

Now you will be able to see what print_r it's displaying.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Where can I print out logs to see immediately in Android Studio?

From Dev

What is the meaning of _r in PHP's print_r()?

From Dev

Where can I see the source code of swiftUI?

From Dev

Where can I see the source code of swiftUI?

From Dev

Where can I see Scrum Feature items?

From Dev

Disk is used but I can not see where

From Dev

Where can I see the version of Itunes that is installed?

From Dev

Where can I see see the properties of an NS-Class?

From Dev

How can I see what processes are running?

From Dev

Where can i see the new file i created in my workspace?

From Java

How can I see what I am about to push with git?

From Dev

i can see what i submited before after pressing back

From Dev

Why can't I see what branch I am in?

From Java

Where can I see my pull requests on GitHub?

From Dev

Where can I see the http requests my browser sends

From Dev

How can I see where exactly exception occurred in Android Studio?

From Dev

Where can I see the default Android styles for things?

From Dev

where is the Serial.println() defined ..? can i see source code for it?

From Dev

AngularJS: Where can I see $httpBackend responses in my browser directly?

From Dev

Where I can see all the methods of a class in Android studio?

From Dev

Where can I see the differents "Hibernate Console Configurations" in Eclipse

From Dev

How is the "rails new" implemented and where can I see it?

From Dev

Where can I see a list of all necessary headers for HTTP requests

From Dev

Where can I see a list of kernel killed processes?

From Dev

Where can I see the Contents of _root.xxx

From Dev

where is the Serial.println() defined ..? can i see source code for it?

From Dev

AngularJS: Where can I see $httpBackend responses in my browser directly?

From Dev

ArrayIndexOutOfBoundsException but I can't see where it goes out of bounds

From Dev

Where can I see the printer driver version on Windows?

Related Related

  1. 1

    Where can I print out logs to see immediately in Android Studio?

  2. 2

    What is the meaning of _r in PHP's print_r()?

  3. 3

    Where can I see the source code of swiftUI?

  4. 4

    Where can I see the source code of swiftUI?

  5. 5

    Where can I see Scrum Feature items?

  6. 6

    Disk is used but I can not see where

  7. 7

    Where can I see the version of Itunes that is installed?

  8. 8

    Where can I see see the properties of an NS-Class?

  9. 9

    How can I see what processes are running?

  10. 10

    Where can i see the new file i created in my workspace?

  11. 11

    How can I see what I am about to push with git?

  12. 12

    i can see what i submited before after pressing back

  13. 13

    Why can't I see what branch I am in?

  14. 14

    Where can I see my pull requests on GitHub?

  15. 15

    Where can I see the http requests my browser sends

  16. 16

    How can I see where exactly exception occurred in Android Studio?

  17. 17

    Where can I see the default Android styles for things?

  18. 18

    where is the Serial.println() defined ..? can i see source code for it?

  19. 19

    AngularJS: Where can I see $httpBackend responses in my browser directly?

  20. 20

    Where I can see all the methods of a class in Android studio?

  21. 21

    Where can I see the differents "Hibernate Console Configurations" in Eclipse

  22. 22

    How is the "rails new" implemented and where can I see it?

  23. 23

    Where can I see a list of all necessary headers for HTTP requests

  24. 24

    Where can I see a list of kernel killed processes?

  25. 25

    Where can I see the Contents of _root.xxx

  26. 26

    where is the Serial.println() defined ..? can i see source code for it?

  27. 27

    AngularJS: Where can I see $httpBackend responses in my browser directly?

  28. 28

    ArrayIndexOutOfBoundsException but I can't see where it goes out of bounds

  29. 29

    Where can I see the printer driver version on Windows?

HotTag

Archive