Introduction
From phpDrone
Welcome to the phpDrone documentation section. In this section we will try to cover out as much as possible from this framework. If you have any question at any time you can emails us (see contact section).
Contents |
Download
So let's start with the beginning. First you have to do is to download phpDrone from our servers. To do that you have two choices: you download it via subversion or via classic download. We recommend the subversion method for the development process, because that's the most updated version of all, with almost every day updates. In case you find any problems immediately contact the CVDS team (see contact section).
The classic download consists in versions that we had time to test much extensively, but that doesn't necessarily means that this versions are bug free. Plus that this versions might not have some features that we just implemented in the subversion versions. We recommend the classic download if you just want to make an idea of what phpDrone can do without going into that much trouble with the subversion.
Subversion
For Widows users, the easiest way is to install TortoiseSVN, available from here. With this tool you can maintain your version of phpDrone always up to date. A complete tutorial on how to use TortoiseSVN can be found here.
For UNIX users, there is the SVN tool that comes with most distributions of UNIX that will help you get the latest version of phpDrone and update it regularly. A good tutorial on how to use SVN from UNIX can be found here.
For locations of SVN repositories and other phpDrone SVN related information, please see the download section.
Classic download
The classic download is pretty straight forward. It will require you just to download a zip from the download section. This zip will contain the phpDrone libraries and a little hello world example to test out your installation in research papers
Install
If you're using the SVN version, you'll only get the the phpDrone libraries . You will have to copy the phpDrone directory, which contains the libraries, to your include path directory (project directory (".") is the safest bet. You can also check the phpinfo() function to see what is your include path).
If you run PHP under UNIX and you want to change the phpDrone settings for your project, create custom filters, create a drone module and many more (most likely), you must set write permission for your application directory, so that phpDrone can create the phpDrone environment directory (droneEnv) in your project root directory, where it will create a default configuration file.
A phpDrone project directory structure should look like this:
[droneEnv] [phpDrone] [templates] index.php Note: directories are marked with "[]"
To be sure you have the latest version of phpDrone, update your checkout-ed version every day (see tutorials mentioned above).
If you choose to download the classic download version, this will come already structured, and with a small "Hello world!" example inside. All you have to do is to extract this to a directory (for example myDroneProj) that is placed in your documentRoot directory (usually htdocs).
Test installation
Type in your browser (considering that you've used for the project directory myDroneProj): http://yourserver.com/myDroneProj. A page displaying Hello Smith! should appear.
If you installed it via subversion, you'll have to create the test files yourself (after you followed the Install step). It easy:
- Create a index.php file in your project directory, alongside the phpDrone libraries directory which can contain something like this
<?php include ("phpDrone/phpDrone.php"); $template = new DroneTemplate('main.html'); $template->set("name","Smith"); $template->render(); ?>
- Create a templates directory along side the index.php file and inside it place a file called main.html which will simply contain:
Hello <!--name--> !- And finally, access the index.php from your project in your web browser. You should see a page which says: Hello Smith !
And with this we end our introduction section. We invite you to start reading throughout the documentation to find out more about what phpDrone put at your disposal.

