Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

response text with createHTTPClient returning my php code?

$
0
0

Hi everybody.

I'm building an application and i'm trying to use a server for php debugging. It happens that when i'm trying to parse my response text, i get a error.

Searching deeply, i found that the problem is that apparently the server side script is not processing.

the responseText gives me back the whole php code.

I'm running xampp and the project it is in the htdocs folder

here's the code in js

var url = "/serverside/test.php";
        xhr.open('GET', url );
        xhr.onerror = function(e)
        {
            Ti.API.info("Error: " + e.error);
        };
        xhr.onload = function(e)
        {
            console.log(this.status);
            if ( this.status == "200")
                console.log("OK");
            Ti.API.info((xhr.responseText));
 
        };
 
        xhr.send(data);
    });
here it is the php code (trying to debug)
<?php
 
 
    echo "yay";
 
 
?>
and here it is the log from the response text :

<?php

echo &quot;yay&quot;;

?>

EXACTLY my php code

anyone there have any lights??

thanks in advance!


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>