现在,当我测试我的aplication时,我需要在netbeans上运行命令:
assets:install
我讨厌一遍又一遍地做事...因为Symfony2需要运行此命令将修改后的文件放在正确的路径中。
有没有办法运行该命令或更改配置文件?
使用 - 合并我收到此消息:
[InvalidArgumentException]
The symlink() function is not available on your system. You need to install the assets without the --symlink option.
解决!
我的Windows版本(XP)不支持 - 合成。我找到了一个可以做到这一点的窗口的链接壳扩展程序。这是程序和文档,非常易于使用!
链接外壳扩展
感谢所有人,这非常有帮助。
您可以在assets:install
命令上使用--symlink
开关:
$ php app/console assets:install -h
Usage:
assets:install [--symlink] [--relative] target
Arguments:
target The target directory (usually "web")
Options:
--symlink Symlinks the assets instead of copying it
--relative Make relative symlinks
Help:
The assets:install command installs bundle assets into a given
directory (e.g. the web directory).
php app/console assets:install web
A "bundles" directory will be created inside the target directory, and the
"Resources/public" directory of each bundle will be copied into it.
To create a symlink to each bundle instead of copying its assets, use the
--symlink option:
php app/console assets:install web --symlink
您对--symlink
参数是您的解决方案是正确的。
假设您使用的是Windows,您需要做的就是从使用Admin Level Level特权运行的命令窗口执行命令。您可以用Google搜索如何为操作系统执行此操作,因为在不同版本的Windows上有更好的方法,并且您没有说您使用的内容。
已解决!
我的Windows版本(XP)不支持 - 合成。我找到了一个可以做到这一点的窗口的链接壳扩展程序。这是程序和文档,非常易于使用!
链接外壳扩展
感谢所有人,这非常有帮助。