我刚刚开始尝试使用yii php框架,我已经按照所有安装教程进行操作,我可以运行yii框架,但是当我想使用命令提示符创建新的Web应用程序时,我遇到了困难。
以下命令就像
cd c:\xampp\pathtoyii\framework
然后
yiic webapp newWebAPP
问题出在我的yii文件夹中,不包含我必须在以下命令中编写的框架文件夹和yiic文件。有人知道这个问题吗?
这是我的yii文件夹根目录
那里没有框架文件夹。
实际上,我需要这样的路径我安装的新版yii有什么不同吗?
答案 0 :(得分:3)
所以这里的问题是你在混合Yii1和Yii2。如果您正在阅读的教程引用“yiic”,那就是Yii1,而不是Yii2。您显示的框架文件夹也来自Yii1。
我不确定您是否正在尝试编写Yii1或Yii2应用程序。如果是Yii2,请在此处查看有关设置新应用的说明:http://www.yiiframework.com/doc-2.0/guide-start-installation.html如果是Yii1,请执行以下操作:http://www.yiiframework.com/doc/guide/1.1/en/quickstart.installation
它们非常相似,但基本上是不同的框架,因为Yii2不向后兼容。
答案 1 :(得分:0)
Read the installation guide! 首先,您必须install a composer。 比,需要资产插件:
Sub InsertPicture()
Dim oSlide As Slide
Dim oPicture As Shape
' Set oSlide to the active slide.
Set oSlide = Application.ActiveWindow.View.Slide
' Protect empty placeholders from being auto-filled by PowerPoint
ProtectEmptyPlaceholders oSlide, True
' Insert Image to Footer
Set oPicture = oSlide.Shapes.AddPicture("PathToFile.png", _
msoFalse, msoTrue, 630, 390, 15, 15)
' Reset empty placeholders
ProtectEmptyPlaceholders oSlide, False
' Move the picture to the centre of the slide. Select it.
With ActivePresentation.PageSetup
oPicture.Select
oPicture.Name = "Dokumentverknüpfung"
End With
End Sub
' Purpose: Adds dummy text to empty placeholders so that pictures can
' be inserted without PowerPoint automatically placing them
' within the first empty placeholder that supports pictures.
' Inputs: oSld - the slide to process.
' bProtect - if true, adds the dummy text to empty
' placeholders and if false, deletes the dummy text from.
' Author: Jamie Garroch of YOUpresent.co.uk 04MAR2016
Sub ProtectEmptyPlaceholders(oSld As Slide, bProtect As Boolean)
Const sText As String = "PROTECTED"
Dim oShp As Shape
For Each oShp In oSld.Shapes
If oShp.Type = msoPlaceholder Then
If oShp.PlaceholderFormat.ContainedType = msoAutoShape Then
If bProtect And Not oShp.TextFrame2.HasText Then oShp.TextFrame2.TextRange.text = sText
If Not bProtect And oShp.TextFrame2.TextRange.text = sText Then oShp.TextFrame2.DeleteText
End If
End If
Next
End Sub
并安装项目:
composer global require "fxp/composer-asset-plugin:~1.1.1"
答案 2 :(得分:0)
Yii2安装以下命令:
(1)首先安装Composer(LINUX):
本地:
curl -sS https://getcomposer.org/installer | php
OR
(1)首先安装Composer(WINDOWS):
C:\Users\username>cd C:\bin
C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php
注意:如果由于readfile导致上述操作失败,请使用http url或在php.ini中启用php_openssl.dll
C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat
C:\Users\username>composer -V
作曲家版本27d8904
(2)Yii2框架在线下载:
基本应用程序:
php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.0-beta
高级应用:
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0-beta
(3)其他应用设置命令:
php init
php yii migrate