symfony PHPフレームワークpart2
- 273 :nobodyさん:2010/11/17(水) 05:46:56 ID:???.net
- C:\MyProject\link>php symfony link:access user01 111.111.111.111
#accessTask.class.php
<?php
class accessTask extends sfBaseTask
{
public function configure()
{
$this->namespace = 'link';
$this->name = 'access';
$this->addArgument('username', sfCommandArgument::OPTIONAL);
$this->addArgument('ip', sfCommandArgument::OPTIONAL);
}
public function execute($arguments = array(), $options = array())
{
$access = new Accesslog();
$access->setUsername($arguments['username']);
$access->setIp($arguments['ip']);
$access->save();
$this->log('access from '. $arguments['ip']);
}
}
132 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200