1 Reply Latest reply on Feb 23, 2011 10:16 PM by uajmal

    Problem with PHP file when made 'Release' of the project

    uajmal

      Problem:

      I call a PHP file as an HTTPService. I set the result of this HTTPService to a function which populates a testTextArea with whatever the PHP file has returned (echoed). This work fine when I run the application from flash builder i.e. I get strings in the testTextArea, echoed by my PHP file. But this does not work fine when I make the Release of the project and the testTextArea gets populated by the whole code of PHP file.

       

      Code:

       

                 private function addUserServiceHandler(event:ResultEvent):void{
                      testTextArea.text = event.result.toString(); //This outputs the whole php file in to the textArea as if it were a string
                  }


                  private function saveButtonClicked():void{
                      addUserService.send();
                  }
                        

              ]]>
          </fx:Script>
         
          <fx:Declarations>
              <mx:HTTPService id="addUserService" url="addUser.php" resultFormat="text" method="POST" result="addUserServiceHandler(event)" >
                  <mx:request xmlns="">
                      <firstName>{firstNameTextInput.text}</firstName>
                      <lastName>{lastNameTextInput.text}</lastName>
                      <imageName>{uploadTextInput.text}</imageName>
                      <adultContent>{adultContentRadioGroup.selectedValue}</adultContent>
                      <p2p>{p2pRadioGroup.selectedValue}</p2p>
                      <priority>{priorityRadioGroup.selectedValue}</priority>
                  </mx:request>
              </mx:HTTPService>

       

          <s:Button id="saveButton" includeIn="AddUser" x="313" y="128" label="Save" width="187" height="33" click="saveButtonClicked()"/>