3 Replies Latest reply on Dec 21, 2008 6:42 AM by Newsgroup_User

    How to Create a File From Flex

    alice_data
      Hi,

      I am trying to create something that would allow a file to be created on its own using PHP on the backend through Flex's HTTPService. I thought two or three lines of code in PHP using fopen would work, but I always get this error message that tells me that the file cannot be opened.

      Does anyone have any suggestion on what I should do to fix this issue?

      Thanks a lot for your help.

      Alice
        • 1. Re: How to Create a File From Flex
          Madhav Subedi Level 4
          it should be a php issue, not flex one... one thing that might have gone wrong is that - do you have write permission to the folder in which you are creating the file??? if so, you must be able to create a file with the proper use of the php funciton: fopen().
          • 2. Re: How to Create a File From Flex
            alice_data Level 1
            Hi,

            It is good to know that there is nothing wrong with what I did in Flex. I will check and see if there is any other PHP errors I have missed over here.

            Thanks for your help.

            Alice
            • 3. Re: How to Create a File From Flex
              Level 7

              "alice_data" <webforumsuser@macromedia.com> wrote in message
              news:gil9c9$s2o$1@forums.macromedia.com...
              > Hi,
              >
              > It is good to know that there is nothing wrong with what I did in Flex. I
              > will check and see if there is any other PHP errors I have missed over
              > here.

              You should test the php part separately from the Flex part. In other words,
              hard code the file to write first and test that. Then write a php page that
              provides the parameters to write the file. Finally, call the php page from
              Flex with the same parameters the other php page used.