具有目录结构的Composer zend1框架? [英] Composer zend1 framework with directory structure?
问题描述
是否可以安装带有作曲家和目录结构的zend 1框架?我找到了只将框架安装到供应商文件夹中的方法,但这没有目录结构...
Is it possible to install zend 1 framework with composer and directory structure? I found the way to install only framework into vendor folder, but this is without directory structure...
没有文件结构,我的composer.json看起来像:
Without file structure my composer.json looks like:
{
"name": "zend1/zend-composer",
"require": {
"zendframework/zendframework1": "1.*"
},
"authors": [
{
"name": "Maximilian",
"email": "maxi@website.com"
}
]
}
推荐答案
您已使用composer正确安装了zend 1.要获得一个新项目,您需要运行:
You correctly installed zend 1 using composer. To get a new project, you need to run:
./vendor/zendframework/zendframework1/bin/zf.sh创建项目myprojectname
在终端中的已安装文件夹中,
in a terminal, at the folder installed,
,然后您还需要编辑 myprojectname/public/index.php
- 删除 require_once'Zend/Application.php';
- 在其位置添加 require_once __DIR __.'/../../vendor/autoload.php';
这将使您能够通过作曲家自动加载器加载Zend库.
This will enable you to load the Zend library through the composer autoloader.
这篇关于具有目录结构的Composer zend1框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!