Best way to load a php file

Hi, in my flex application I need to load some php files and get the results from these files. I have been using HTTPService and it works just fine. But, now I need to load a php file, get the result and stay in the same function where the file was loaded.
for instance:
var php:HTTPService=new HTTPService();
php.url="server.com/file.php";
php.send()
Alert.show(String(php.lastResult));
But this of course won't work because send()  sends you to the event handler but I need to stay in the same function.
Is urlloader better for this case and how to use it please if yes .
Thanks

If you want to use one of your variables used on the function, you
can declare them class members (private, protected or public) and then you
can access your variables from the function that handle the success event.

Similar Messages

  • Best way to load messages - properties file or database?

    Hi Guys,
    I have a debate with my colleague about best way to load/keep GUI messages.
    As we known, all those messages are in properties file, web tier will handle the messages loading to GUI.
    However, my colleague suggested, we could save all the messages in a database table, when application starts up, it will load all the messages from database.
    Please help me figure out pros/cons for both ways? What's the best to deal with message loading?
    Thanks

    allemande wrote:
    Please help me figure out pros/cons for both ways?There is no big difference with regard to performance and memory use. Both are after all cached in memory at any way. I wouldn't worry about it.
    The biggest difference is in the maintainability and reusability. Propertiesfiles are just textbased files. You can just edit the messages using any text editor. It is only a bit harder to wrap it in a UI like thing, but you can achieve a lot using java.util.Properties API with its load() and store() methods. Another concern is that it cannot be used anymore if you switch from platform language (e.g. Java --> C# or so) without writing some custom tool to read Java style properties files at any way. Databases, on the other hand, require SQL knowledge or some UI tool to edit the contents. So you have to create a UI like thing at any way if you want to let someone with less knowledge edit the messages. This is more time consuming. But it can universally be used by any application/platform by just using SQL standard.

  • Oracle 10.1, Whats the best way to load XML in database?

    Hi All,
    I am a typical Oracle developer. I know some Java and some XML technologies, but not an expert.
    I will be receiving XML files from some system, which will be,
    - of reasonable size like 2 to 15 MBs
    - of reasonable complexity, like the root element have children, grand-children and great-grand-children, with attributes and all
    - Every day it needs to be loaded to Oracle database, in relational format
    - we need not update the XML data, only put the XML data in relational table
    My questions are,
    - With Oracle 10.1, XML DB, what is the best way to load this XML file to relational Oracle tables ?
    - What can be the steps in this process ?
    - In the documentation, I was lost and was not able to decide anything concrete
    - If I write a pure Java program with SAX API and load the data to Oracle database in same program, is it a good idea?
    - Is there any pure Oracle based way to do this?
    - If I want to avoid using DOM parser, as it will need more JAVA_POOL_SIZE, what can be the way ?
    Please help.
    Thanks

    Many customer solve this problem by registering an XML Schema that corresponds to their XML and then creating relational views over the XML that allow them to access the content in a relational manner. They then use insert as select operations on the relational views to transfer data from the XML into relational tables where necessary. There are a large number of threads in this forum with detailed examples of how this can be done. Most of the customers who have adopted this approach have discovered that this is the least complex approach in terms of code that to be developed / maintained and offeres acceptable performance.

  • Best way to load initial TimesTen database

    I have a customer that wants to use TimesTen as a pure in-memory database. This IMDB has about 65 tables some having data upwards of 6 million rows. What is the best way to load this data? There is no cache-connect option being used. I am thinking insert is the only option here. Are there any other options?
    thansk

    You can also use the TimesTen ttbulkcp command line utility, this tool is similar to SQL*Loader except it handles both import and export of data.
    For example, the following command loads the rows listed in file foo.dump into a table called foo in database mydb, placing any error messages into the file foo.err.
    ttbulkcp -i -e foo.err dsn=mydb foo foo.dump
    For more information on the ttbulkcp utility you can refer to the Oracle TimesTen API Reference Guide.

  • Best Way to Load Data in Hash Partition

    Hi,
    I have partitioning by Hash on a Large Table of 5 TB. We have to load Data say more than 500GB daily on that table from ETL.
    What is the best way to Load data into that Big Table which has hash Partition .
    Regards
    Sahil Soni

    Do you have any specific requirements to match records to lookup tables or it just a straight load - that is an insert?
    Do you have any specific performance requirements?
    The easiest and fastest way to load data into Oracle is via external file and parallel query/parallel insert. Remember that parallel DML is not enabled by default and you have to do so via alter session command. You can leverage multiple CPU cores and direct path operation to perform the load.
    Assuming your database is on a linux/unix server - you could NFS load the file if it is on a remote system, but then you will be most likely limited by network transfer speed.

  • Best way to load a local XML

    What's the best way to load a local XML file into a Datagrid
    without using the HTTP service?
    Thanks

    Use Class.getResource() and Class.getResourceAsStream,
    when you eventually jar it up, just put the same
    hierarchy in the jar and they can be found.
    BufferedInputStream in = new
    BufferedInputStream(Class.getResourceAsStream("foo/bar/
    yimg.jpg"));for example.
    That should work out of the Jar too.Thanks v. much - got it all going some days ago but found it all fell apart when I ran the code within the jar. However I used the similar ClassLoader routines and found that if you first get a uri for the resource then it is a fully-qualified file uri. This works ok when running directly against files on disk, but once they are in a .jar it all turns to custard, giving you "java.lang.IllegalArgumentException: URI is not hierarchical".
    I followed your suggestion to use Class.getResourceAsStream and it now works perfectly - thanks again!

  • Best way to load CSS depending on language

    What's the best way to load CSS depending on user language? If I am making a publishing site with 2 languages then how do I load particular CSS depending on language?
    I know one way to use is to use javascript (jquery) but I was thinking if there is a better way to do that?

    <SharePoint:CssRegistration name=”<% $SPUrl:/_layouts/projectname/styles/~language/master.css
    %>” runat=”server”/>
    http://lionadi.wordpress.com/2013/04/30/sharepoint-language-specific-css-loading/
    http://sharepoint.stackexchange.com/questions/54698/how-to-specify-which-css-files-to-load-in-sharepointcsslink-when-using-themes
    http://stackoverflow.com/questions/858990/how-can-i-target-css-to-a-particular-sharepoint-page-layout-file
    asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
    <link id="Link1" href="<% $SPUrl:~SiteCollection/Style Library/mystyle.css%>" runat="server" type="text/css" rel="stylesheet" />
    <SharePoint:ScriptLink id="jQueryCore" language="javascript" name="ui.core.js" runat="server"/>
    </asp:Content>

  • What is the best way to keep my personal files stored in iCloud separate from my work-related files?

    What is the best way to keep my personal files stored in iCloud separate from my work-related files? It seems that I'm not allowed to link my iPad mini and my work iMac using two different accounts, so I'm wondering how to make my single personal account work for both, while keeping personal vs work files reasonably separated.
    Thanks for any suggestions.

    Is it possible for you to upgrade your account to iCloud Drive? That would mean, all Macs upgraded to Yosemite, and all mobile devices to iOS8?
    See:  iCloud Drive FAQ and iCloud: About using iWork for iOS and iCloud
    In iCloud Drive you could create two separate custom folders, one for work documents and one for private documents and organize your documents there.  Don't use the app specific folders (Keynote, Pages, Numbers, ...) , because you can only create one level of folders inside these folders.

  • What's the best way for reading this binary file?

    I've written a program that acquires data from a DAQmx card and writes it on a binary file (attached file and picture). The data that I'm acquiring comes from 8 channels, at 2.5MS/s for, at least, 5 seconds. What's the best way of reading this binary file, knowing that:
    -I'll need it also on graphics (only after acquiring)
    -I also need to see these values and use them later in Matlab.
    I've tried the "Array to Spreadsheet String", but LabView goes out of memory (even if I don't use all of the 8 channels, but only 1).
    LabView 8.6
    Solved!
    Go to Solution.
    Attachments:
    AcquireWrite02.vi ‏15 KB
    myvi.jpg ‏55 KB

    But my real problem, at least now, is how can I divide the information to get not only one graphic but eight?
    I can read the file, but I get this (with only two channels):
    So what I tried was, using a for loop, saving 250 elements in different arrays and then writing it to the .txt file. But it doesn't come right... I used 250 because that's what I got from the graphic: at each 250 points it plots the other channel.
    Am I missing something here? How should I treat the information coming from the binary file, if not the way I'm doing?
    (attached are the .vi files I'm using to save in the .txt format)
    (EDITED. I just saw that I was dividing my graph's data in 4 just before plotting it... so It isn't 250 but 1000 elements for each channel... Still, the problem has not been solved)
    Message Edited by Danigno on 11-17-2008 08:47 AM
    Attachments:
    mygraph.jpg ‏280 KB
    Read Binary File and Save as txt - 2 channels - with SetFilePosition.vi ‏14 KB
    Read Binary File and Save as txt - with SetFilePosition_b_save2files_with_array.vi ‏14 KB

  • Best way to read from a file

    What would be the best way to read from a file. Which classes do I need to use?
    I have to write a program, which reads data from a comma separated flat file, parse it and after inserting some busineess logic insert into a databse .
    I will have to read the data line by line.
    Any help????

    I would use:
         public void readData()
              try
                   data = new String[this.countRows("comp.txt")][];
                   BufferedReader br = new BufferedReader(new FileReader("comp.txt"));
                   for(int x = 0; x < data.length; x++)
                        StringTokenizer temp = new StringTokenizer(br.readLine(), "?");
                        data[x] = new String[temp.countTokens()];
                        for(int y = 0; y < data[x].length; y++)
                             data[x][y] = temp.nextToken();
              catch(Exception e)
                   System.out.println(e.toString());
         private int countRows(String f)
              int t = 0;
              try
                   BufferedReader brCountRows = new BufferedReader(new FileReader(f));
                   while(brCountRows.readLine() != null)
                        t++;
              catch(Exception e)
                   System.out.println(e.toString());
                   return t;
              return t;
         }It works deliciously!

  • Best way to load configuration

    Hi All
    I've developed an application and I want to give my client the possiblity to change some configuration data (paths, languaje, etc).
    Which is the best way to store this kind of data and wich is the best way to load it ?
    I don't want a simple book or manual reference. I'll appreciate words of experience wisdom.. :)
    Thanks in advance
    <jl>

    It used to be through java.util.Properties, but
    I've found the java.util.preferences classes to
    be almost too easy to use - pretty sweet stuff! (And
    that should be enough hints for you right there...)I'll read preferences tips in API reference.
    Thanks.
    <jl>

  • Best way to load data from External data to ADC

    Hi Guy,
    I am new in BAM. I currently working for a existing system that have all it data in existing system, which i only have the view access to the database/table.
    so i just wonder, what is the best way to load the data so that it can populate to the active data cache?
    thanks.

    Hello,
    Use the EDS.For reference http://docs.oracle.com/cd/E14571_01/integration.1111/e10224/bam_extl_data_sources.htm
    Regards
    Siva Sankar

  • What's The Best Way to Load a Replacement iPod Touch?

    I just received a replacement iPod Touch 3G for my daughter. Her iTunes library for the Touch that we returned to Apple is on her MacBook Pro. What is the best way to load the new Touch? She plans on using the same name for it. Should I restore from a previous backup or just plug it in and let in sync? Do I need to set anything on iTunes for disk management?
    Thank you,
    Bruce

    If she wants it like her old one the previous backup, if there is anything she wants to change though, now would be a perfect time to just resync it and start over. It really depends on what she wants.

  • What's the best way to load FieldPoint measurement data into PI System?

    I am finding the best way to load data collected by NI Field Point (FP2220) into the PI system of our power plant.
    I found pieces of information about FieldPoint OPC server in NI.com. Not sure if it comes with Field Point Hardware, sold by NI as a separate product or it is actually non-standard NI products. Anyway, I know that there exists a thing called FieldPoint OPC server.
    The PI system I mentioned has a OPC client software called PI-OPC interface. It is able to communicate with standard OPC DA server. If that FieldPoint OPC server is a standard OPC DA server provide data collected by Field Point complying to OPC standard, than that's perfect.
    Anyone familar with PI system and NI product, please help if the above is going to work or if there is a better way to put Fieldpoint data into PI.

    Hi Eric,
    This information really helpful, thanks. Regarding to the NI OPC server for NI FieldPoint, I have the other query.
    In my setup, there are two sets of FieldPoint located in two different locations on my ethernet network. They are going to be controlled by a single PC. If I am going to connect both my FieldPoint sets with OPC standard, how many NI OPC server for FieldPoint do I need to connect to? Are there two NI OPC servers each serves one FieldPoint set? Or there is only NI OPC server which serves both FieldPoint sets?
    I am concerning about the number of NI OPC server instances running, because the number of OPC client license I need to purchase depends on how many OPC server I need to connect to. If one NI OPC server serves both my FieldPoint sets, I only need to buy one OPC client license; otherwise, I need to purchase two. In the future, I am going to have another two sets of FieldPoint sets, so the answer of my query determines how many OPC clients I need to purchase eventually - One or four. A huge price difference.
    Looking forward to your reply.
    Regards,
    Roger

  • Best way to load "Action Essentials"

    Kinda new with using Macs....need to know the BEST way to load Action Essentials?

    well I was really over-thinking it! ha
    Thanks so much Rick!
    On Fri, Sep 12, 2014 at 12:24 PM, Rick Gerard <[email protected]>

Maybe you are looking for

  • Image in template background do not appear in browser

    Hello all I run a site ( http://ntp.neuroscience.wisc.edu/ ) that uses templates for backgrounds/spry menus for its pages. We currently use three templates to display backgrounds across the site and up until a few days ago everything displayed fine,

  • I can't see my iWeb site on iPage hosting

    I made my site in iWeb after upgrading to LION I bought my domain name and published my site to the iPage hosting service my site should appear at www.positivelyproudtobeme.com  However, what shows up when I go to that URL is a blank white screen or

  • Actions scheduled using DB13 fail.

    Hi All,        Actions like Whole Database Offline Backup, Check DB, Update Statistics fail when scheduled using DB13. It gives the following error: <b>Can't exec external program (Permission denied)</b>        But the same when scheduled using BrToo

  • Forecasting for supersession chain

    We are using the automatic reorder point MRP type when forecasting is run the system system takes individual material for determing the forecast and not the the material as a part of supersession chain. Let me give u a example. material "A" has a con

  • HT4061 Help with Restore error message "An unknown error has occurred (2006)"

    My iphone 4s stopped working suddenly today - I have tried to restore it but am getting an error message every time that says "An unknown error has occurred (2006)" - does anyone know what I can do please?