小编use*_*249的帖子

PHP,Yii用户扩展

我尝试安装yii扩展名http://www.yiiframework.com/extension/yii-user/并尝试插入命令'yiic migrate --migrationPath = user.migrations'.如何正确地工作而不是:

C:\xampp\htdocs\eshops\protected>..\framework\yiic migrate --migrationPath=modules.user.migrations
Error: The migration directory does not exist: modules.user.migrations
C:\xampp\htdocs\eshops\protected>cd ..
C:\xampp\htdocs\eshops>framework\yiic migrate --migrationPath=protected.modules.user.migrations
Error: The migration directory does not exist: protected.modules.user.migrations
C:\xampp\htdocs\eshops>cd protected
C:\xampp\htdocs\eshops\protected>..\framework\yiic migrate --migrationPath=user.migrations
Error: The migration directory does not exist: user.migrations
Run Code Online (Sandbox Code Playgroud)

我有XAMPP和Windows 7.

谢谢

php xampp yii

4
推荐指数
1
解决办法
1294
查看次数

回调函数中的PHP变量

我有一个问题.在array_filter中:

$min = 4;
$arr = array(1,2,3,4,5,6,7);
$arr = array_filter($arr,function($e) {
    return $e <= 4;
});
var_dump($arr);
Run Code Online (Sandbox Code Playgroud)

有用.

如果我使用

$min = 4;
$arr = array(1,2,3,4,5,6,7);
$arr = array_filter($arr,function($e) {
    return $e <= $min;//$min variable gives error
});
var_dump($arr);
Run Code Online (Sandbox Code Playgroud)

如何正确,它看到回调中的$ min变量?

谢谢你的提示

php callback

0
推荐指数
1
解决办法
104
查看次数

标签 统计

php ×2

callback ×1

xampp ×1

yii ×1