flex-en-php

Gesponsorde koppelingen

PHP script bestanden

  1. flex-en-php

« Lees de omschrijving en reacties

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  width="408" height="358">

<mx:Script source="functions.as" />

    <mx:HTTPService id="info" result="ongo(event)" showBusyCursor="true" url="http://127.0.0.1/test.php" useProxy="false" />
    
<mx:DataGrid dataProvider="{myData}" editable="false" width="350" height="144" x="29" y="93" >
        <mx:columns>
           <mx:DataGridColumn width="100" headerText="ID" dataField="id"/>
           <mx:DataGridColumn width="100" headerText="Naam" dataField="name"/>
           <mx:DataGridColumn width="150" headerText="E-mail" dataField="email"/>
        </mx:columns>
    </mx:DataGrid>

    <mx:Button x="296" y="245" label="clear data" click="del()"/>
    <mx:Button x="193" y="245" click="info.send()" label="update data"/>
    
</mx:Application>


Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// ActionScript file
//functions.as
        
        import mx.rpc.events.ResultEvent;
        
        [Bindable]
        public var myData:Object;
        
        public function ongo(evt:ResultEvent) :void{
            
            myData = evt.result.people.person;
            
            
        }


Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//PHP output

<people>
    <person>
        <id>1</id>
        <name>karel</name>
        <email>[email protected]</email>
    </person>
    <person>
        <id>2</id>
        <name>klaas</name>
        <email>[email protected]</email>
    </person>
    <person>
        <id>3</id>
        <name>piet</name>
        <email>[email protected]</email>
    </person>
    <person>
        <id>4</id>
        <name>jaap</name>
        <email>[email protected]</email>
    </person>
    <person>
        <id>5</id>
        <name>cees</name>
        <email>[email protected]</email>
    </person>
</people>

 
 

Om de gebruiksvriendelijkheid van onze website en diensten te optimaliseren maken wij gebruik van cookies. Deze cookies gebruiken wij voor functionaliteiten, analytische gegevens en marketing doeleinden. U vindt meer informatie in onze privacy statement.