LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   [Ubuntu Server 12.04+PHP Server Side Script+Android Client App]Stripslashes not work! (https://www.linuxquestions.org/questions/linux-server-73/%5Bubuntu-server-12-04-php-server-side-script-android-client-app%5Dstripslashes-not-work-946630/)

MarkoSan 05-24-2012 08:35 AM

[Ubuntu Server 12.04+PHP Server Side Script+Android Client App]Stripslashes not work!
 
Dear Sirs and Madams!

I am developing Android app, which relies on getting data from php scripts, which fetch data from mysql database. Now, in one table there are mechandise categories with CategoryName and CategoryPathToIcon fields, the first one is string-categorny name, second one is path to catgegory icon. In php script, I encode twese two string values into json object and then send it to android app. This works ok, however, from php script on Android side I get quoted strings and therefore category picture is not found, since the quoted string, that represents path is not equal as unqouted string (right icon path). Therefore I've used php function stripslashes() function, but with no success.

I use php version:
Code:

php --version
PHP 5.3.10-1ubuntu3.1 with Suhosin-Patch (cli) (built: May  4 2012 02:20:36)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

.magic_quotes are disables in php.ini file. Why does stripslashes() not work?

Sincerely,
Marko


All times are GMT -5. The time now is 10:52 AM.