Silex 설치

Silex 설치

1 사전 작업[ | ]

2 composer로 설치[ | ]

root@zetawiki:~# cd /usr/share/php
root@zetawiki:/usr/share/php# rm -f composer.*
root@zetawiki:/usr/share/php# composer require "silex/silex"
Using version ^1.3 for silex/silex
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/routing (v3.0.4)
    Downloading: 100%         

  - Installing psr/log (1.0.0)
    Downloading: 100%         

  - Installing symfony/debug (v3.0.4)
    Downloading: 100%         

  - Installing symfony/polyfill-mbstring (v1.1.1)
    Downloading: 100%         

  - Installing symfony/http-foundation (v3.0.4)
    Downloading: 100%         

  - Installing symfony/event-dispatcher (v3.0.4)
    Downloading: 100%         

  - Installing symfony/http-kernel (v3.0.4)
    Downloading: 100%         

  - Installing pimple/pimple (v1.1.1)
    Downloading: 100%         

  - Installing silex/silex (v1.3.5)
    Downloading: 100%         

symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/class-loader ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/console ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/finder ()
symfony/http-kernel suggests installing symfony/var-dumper ()
Writing lock file
Generating autoload files
  • 폴더명 변경
root@zetawiki:/usr/share/php# mv vendor/ silex
root@zetawiki:/usr/share/php#

3 인클루드 테스트[ | ]

root@zetawiki:/usr/share/php# cd
root@zetawiki:~# vi silex_test.php
<?php
require 'silex/autoload.php';
$app = new Silex\Application();
root@zetawiki:~# php silex_test.php 
root@zetawiki:~#

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}