php:phalcon
Phalcon
Phalcon http://www.phalconphp.com/ja/
cphalcon https://github.com/phalcon/cphalcon
phalcon-devtools https://github.com/phalcon/phalcon-devtools
Phalcon
ビルド、インストール
# yum install gcc # git clone git://github.com/phalcon/cphalcon.git # cd cphalcon/build/ # ./install # echo "extension=phalcon.so" > /etc/php.d/phalcon.ini # /etc/init.d/httpd restart # php -i|grep -ir phalcon /etc/php.d/phalcon.ini phalcon phalcon => enabled Author => Phalcon Team and contributors PTOOLSPATH => /root/phalcon-devtools/ PATH => /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/root/phalcon-devtools _SERVER["PTOOLSPATH"] => /root/phalcon-devtools/ _SERVER["PATH"] => /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/root/phalcon-devtools
Phalcon Developper Tools
git から clone(※インストール場所に注意)
# cd /usr/local/bin/
インストール(PATHを通す)
# git clone git://github.com/phalcon/phalcon-devtools.git # ./phalcon-devtools/phalcon.sh # less /root/.bash_profile export PTOOLSPATH=/usr/local/bin/phalcon-devtools/ export PATH=$PATH:/usr/local/bin/phalcon-devtools # source .bash_profile
composer
# cd /var/www/
# mkdir devtools
# cd devtools/
# curl -s http://getcomposer.org/installer | php
# vi composer.json
{
"require": {
"phalcon/devtools": "dev-master"
}
}
# php composer.phar install
# ln -fs /var/www/devtools/vendor/phalcon/devtools/phalcon.php /usr/bin/phalcon
# chmod ugo+x /usr/bin/phalcon
# phalcon Phalcon DevTools (2.0.1) Available commands: commands (alias of: list, enumerate) controller (alias of: create-controller) model (alias of: create-model) all-models (alias of: create-all-models) project (alias of: create-project) scaffold (alias of: create-scaffold) migration (alias of: create-migration) webtools (alias of: create-webtools)
Phalcon Devtoolsを使ったMVCプロジェクト作成
# cd /var/www/html/
# phalcon project samplepj --enable-webtools
Phalcon DevTools (2.0.1)
Success: Controller "index" was successfully created.
Success: Project 'samplepj' was successfully created.
# chmod 777 samplepj/app/cache/
# tree samplepj/
samplepj/
├── app
│ ├── cache
│ ├── config
│ │ ├── config.php
│ │ ├── loader.php
│ │ └── services.php
│ ├── controllers
│ │ ├── ControllerBase.php
│ │ └── IndexController.php
│ ├── migrations
│ ├── models
│ └── views
│ ├── index
│ │ └── index.volt
│ ├── index.volt
│ └── layouts
├── index.html
└── public
├── css
│ ├── bootstrap
│ │ ├── bootstrap.min.css
│ │ ├── bootstrap-responsive.min.css
│ │ └── index.html
│ └── codemirror
│ ├── ambiance.css
│ ├── codemirror.css
│ ├── codephalcon.css
│ └── index.html
├── files
├── img
│ └── bootstrap
│ ├── glyphicons-halflings.png
│ └── index.html
├── index.php
├── js
│ ├── bootstrap
│ │ ├── bootstrap.min.js
│ │ └── index.html
│ ├── codemirror
│ │ ├── addon
│ │ │ ├── edit
│ │ │ │ ├── index.html
│ │ │ │ └── matchbrackets.js
│ │ │ ├── index.html
│ │ │ └── selection
│ │ │ ├── active-line.js
│ │ │ └── index.html
│ │ ├── index.html
│ │ ├── lib
│ │ │ ├── codemirror.js
│ │ │ ├── codephalcon.js
│ │ │ └── index.html
│ │ └── mode
│ │ ├── clike
│ │ │ ├── clike.js
│ │ │ └── index.html
│ │ ├── css
│ │ │ ├── css.js
│ │ │ └── index.html
│ │ ├── htmlmixed
│ │ │ ├── htmlmixed.js
│ │ │ └── index.html
│ │ ├── index.html
│ │ ├── php
│ │ │ ├── index.html
│ │ │ └── php.js
│ │ └── xml
│ │ ├── index.html
│ │ └── xml.js
│ └── jquery
│ ├── index.html
│ └── jquery.min.js
├── temp
├── webtools.config.php
└── webtools.php
php/phalcon.txt · 最終更新: 2025/02/16 13:53 by 127.0.0.1
