Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
281a3c1e
Commit
281a3c1e
authored
May 24, 2012
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more information about how to install Silex
parent
1dcc05dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
doc/intro.rst
doc/intro.rst
+4
-2
doc/usage.rst
doc/usage.rst
+39
-1
No files found.
doc/intro.rst
View file @
281a3c1e
...
@@ -22,7 +22,9 @@ step.
...
@@ -22,7 +22,9 @@ step.
**Let's go!**::
**Let's go!**::
require_once __DIR__.'/vendor/autoload.php';
// web/index.php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app = new Silex\Application();
...
@@ -43,6 +45,6 @@ Finally, the app is run. Visit ``/hello/world`` to see the result.
...
@@ -43,6 +45,6 @@ Finally, the app is run. Visit ``/hello/world`` to see the result.
It's really that easy!
It's really that easy!
Installing Silex is as easy as it can get. Download the `silex.zip`_ file,
Installing Silex is as easy as it can get. Download the `silex.zip`_ file,
unzip
it, and you're done!
extract
it, and you're done!
.. _silex.zip: http://silex.sensiolabs.org/get/silex.zip
.. _silex.zip: http://silex.sensiolabs.org/get/silex.zip
doc/usage.rst
View file @
281a3c1e
...
@@ -3,6 +3,40 @@ Usage
...
@@ -3,6 +3,40 @@ Usage
This chapter describes how to use Silex.
This chapter describes how to use Silex.
Installation
------------
If you want to get started fast, download either the `silex.zip`_ or the
`silex.tgz`_ archive and extract it, you should have the following directory
structure:
.. code-block:: text
├── composer.json
├── composer.lock
├── vendor
│ └── ...
└── web
└── index.php
If you want more flexibility, use Composer instead. Create a
``composer.json``:
.. code-block:: json
{
"require": {
"silex/silex": "dev-master"
}
}
And run Composer to install Silex and all its dependencies:
.. code-block:: bash
$ curl -s http://getcomposer.org/installer | php
$ composer.phar install
Bootstrap
Bootstrap
---------
---------
...
@@ -10,7 +44,9 @@ To bootstrap Silex, all you need to do is require the ``vendor/autoload.php``
...
@@ -10,7 +44,9 @@ To bootstrap Silex, all you need to do is require the ``vendor/autoload.php``
file and create an instance of ``Silex\Application``. After your controller
file and create an instance of ``Silex\Application``. After your controller
definitions, call the ``run`` method on your application::
definitions, call the ``run`` method on your application::
require_once __DIR__.'/vendor/autoload.php';
// web/index.php
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
$app = new Silex\Application();
...
@@ -779,3 +815,5 @@ this sample ``web.config`` file:
...
@@ -779,3 +815,5 @@ this sample ``web.config`` file:
</configuration>
</configuration>
.. _FallbackResource directive: http://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/
.. _FallbackResource directive: http://www.adayinthelifeof.nl/2012/01/21/apaches-fallbackresource-your-new-htaccess-command/
.. _silex.zip: http://silex.sensiolabs.org/get/silex.zip
.. _silex.tgz: http://silex.sensiolabs.org/get/silex.tgz
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment