Php Symfony2-在Netbeans上自动安装资产

Php Symfony2-在Netbeans上自动安装资产,php,html,css,symfony,assets,Php,Html,Css,Symfony,Assets,现在,当我测试我的应用程序时,我需要在netbeans上运行命令: assets:install 我讨厌一次又一次地做事情。。。因为symfony2需要运行此命令才能将修改后的文件放在正确的路径中 有没有办法运行该命令或更改配置文件 使用--symlink,我收到以下消息: [InvalidArgumentException]

现在,当我测试我的应用程序时,我需要在netbeans上运行命令:

assets:install 
我讨厌一次又一次地做事情。。。因为symfony2需要运行此命令才能将修改后的文件放在正确的路径中

有没有办法运行该命令或更改配置文件

使用--symlink,我收到以下消息:

  [InvalidArgumentException]                                                                                            
  The symlink() function is not available on your system. You need to install the assets without the --symlink option.  
解决了

我的Windows版本(XP)不支持--symlink。我发现了一个Windows的链接外壳扩展可以做到这一点。 这里是程序和文档,非常容易使用

感谢大家,它非常有用。

您可以使用
--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,您需要做的是从以管理员级别权限运行的命令窗口执行命令。你可以在谷歌上搜索如何为你的操作系统做到这一点,因为在不同版本的Windows上有更好的方法,而且你没有说你在使用什么。

解决了

我的Windows版本(XP)不支持--symlink。我发现了一个Windows的链接外壳扩展可以做到这一点。这里是程序和文档,非常容易使用


感谢大家,它非常有用。

Symfony使用符号链接,因此您无需每次修改文件时都运行该命令。要创建每个捆绑包的符号链接而不是复制其资产,请使用
--symlink
选项系统上没有symlink()函数。您需要安装不带--symlink选项的资产。[InvalidArgumentException]@Patrick您运行的是Vista之前的windows版本吗@cheesemacfly我在使用XP,这是一个问题吗?我发现关于--symlink。对不起,我忘了提这个问题了。现在我要编辑它。但似乎我不能使用它。@lcode4food我正在使用XP,正如cheesemacfly所说,似乎缺少vista之前的windows版本--symlink?我从来不知道windows支持的symlinks。这改变了一切!