Creating a New Flex/PHP Project

Creating a Flex/PHP project creates a pair of projects; one Flex web project (an application that runs in Flash Player in a browser), and one PHP project. The Flex web project automatically has PHP Support enabled, creating modular code, which allows the two projects to be independent and yet still be aware of one another so that they can create one joint application. This gives you the advantage of being able to distinguish between Flex developers (client side), and developers/back end developers (PHP server side).

 

 

Instructions on how to complete a procedure

To create a new Flex and PHP project:

  1. Go to File | New | Flex and PHP Project.
    -Or- In the Package Explorer view, right-click and select New | Flex and PHP Project..
    The New Flex and PHP Project wizard opens.

create_php_project.png

  1. This dialog contains the details of your PHP project. In the dialog, enter the following information:
  • Project name - The name for your PHP project.

  • Contents - Select whether to:

    • Create new project in workspace - Creates a new PHP project in the workspace directory.

    • Create project at existing location (from existing source) - Creates a PHP project pointing to files situated outside of the workspace. Click Browse to select the required source content.

    • Create project on a local server - Creates the project on a local server. This option will only be available if a local Zend Server has been configured in the PHP Servers Preferences.

    • Framework version - Select the Zend Framework version you would like to work with from the dropdown menu.

  • Server location - Enter the following

    • Web Root - The document root of your server.
      The web root is the directory where your web pages exist in your server, for example “C:\Program Files\Zend\Apache2\htdocs”.

    • Root URL - The URL of your server, for example “http://localhost”.

  1. Click Validate Configuration.
    If Flash Builder 4.5 for PHP cannot validate the configuration, review your web root and root URL and make sure they both exist on the machine.

  2. If the configuration has been validated click Next.
    The Create Flex Project dialog opens.

create_flex_project.png

  1.  Enter the following information:

  • Project Name - The name for your Flex project.
  • Project location - Decide whether to use the default location, or select your own by clicking Browse.

  • Output folder - Select an output folder for your compiled Flex/PHP application, where compiled output files are stored. By default they are stored in the “public” folder of your PHP project.
    To achieve streamlined debugging, the "bin-debug" folder of your Flex project will refer to this folder.

  • Flex SDK version - Select whether to:

    • Use default SDK (currently “Flex Hero”) - Mark this check-box to use the default SDK.

    • Use a specific SDK - Use a different SDK than the default.

  1. Click Finish.
    Your Flex/PHP application is created.

Creating a Flex/PHP application creates a PHP project and a Flex Web project with PHP Support enabled in your workspace. You can now use a PHP class you create and perform PHP Introspection to begin binding the data.

 

 

Related Links

Related Links:
Creating a New Flex Mobile/PHP Project

Enabling/Disabling PHP Support