Actually you did manually what flex builder does with php server-side enabled. The amfphp project in the console setup to you when you first-load the gateway to do that.
When you just set -services and the uri for the services-config.xml file the .swf is metadated to that uri to open a gateway for the amfphp services. Regards -- Igor On Sun, Sep 7, 2008 at 6:30 PM, nwebb <[EMAIL PROTECTED]> wrote: > Hi, > > I skipped a step when setting up a flex-remoting (amfphp) project, but it > still works. > > I didn't set up the Flex project to use PHP when I created it, and so > didn't define the webroot or the root url at all. > > I added in the services-config file (see code at the bottom of this email) > and I added the following additional compiler argument: -services > "services-config.xml" and that was all I needed to get things working. > > Does anyone know if amfphp automatically assume the uri in the config file > will start with http://localhost/ when not otherwise defined? > > The config file I used defines gateway.php as being in the "amfphp" folder > in the webroot, but how does the Flex project know the location of my > webroot?! (which by the way is C:\xampp\htdocs) > > > Cheers. > > // SERVICES-CONFIG CODE > <?xml version="1.0" encoding="UTF-8"?> > <services-config> > <services> > <service id="amfphp-flashremoting-service" > class="flex.messaging.services.RemotingService" > messageTypes="flex.messaging.messages.RemotingMessage"> > > <destination id="amfphp"> > <channels> > <channel ref="my-amfphp"/> > </channels> > <properties> > <source>*</source> > </properties> > </destination> > </service> > </services> > <channels> > <channel-definition id="my-amfphp" > class="mx.messaging.channels.AMFChannel"> > <endpoint uri="/amfphp/gateway.php" > class="flex.messaging.endpoints.AMFEndpoint"/> > </channel-definition> > </channels> > </services-config> > > > -- ---------------------------- Igor Costa www.igorcosta.com www.igorcosta.org