Warning: require(D:\Apache2. 2 \htdocs\yii2\basic\web/../vendor/autoload.php): failed to open stream: No such file or directory in D:\Apache2. 2 \htdocs\yii2\basic\web\index.php on line 7 Fatal error: require(): Failed opening required ' D:\Apache2.2\htdocs\yii2\basic\web/../vendor/autoload.php ' (include_path= ' .;C:\php\pear ' ) in D:\Apache2. 2 \htdocs\yii2\basic\web\index.php on line 7
php.ini中
include_path='.;C:\php\pear' 前面的分号注释去掉
C:\Users\wt> d: D:\ >cd apache2. 2 /htdocs/ yii2 D:\Apache2. 2 \htdocs\yii2>composer global require " fxp/composer-asset-plugin:1.0.0-beta3 " D:\Apache2. 2 \htdocs\yii2>composer create-project --prefer-dist yiisoft/yii2-app- basic basic
参考:
http://docwithcn.com/guide-start-installation.html
http://www.yiichina.com/guide/2/start-installation