我正在尝试在我的网站中使用Google Client API在Symfony2中编写谷歌登录.我按照这里的说明进行操作,但是当我调用$ client-> authenticate($ code)时; 命令异常抛出告诉:
无法连接到www.googleapis.com端口443:网络无法访问有
什么问题?
我有一个symfony项目,并将其上传到主机。这是我的文件夹顺序:
www
-------vendor
-------bin
-------src
-------app
-------html
--------------(my web content is inside html folder including .htaccess)
--------------app.php
Run Code Online (Sandbox Code Playgroud)
当我ip_address/app.php在浏览器中键入内容时,它会显示我的主页。但我想app.php从所有请求网址中删除。请帮我做到这一点。
我在寻找解决方案,但是因为我对apache配置一无所知,所以无法解决我的问题。
请给我一个直接的解决方案或的完整代码.htaccess。
想象一下,您正在使用symfony2开发一个网站,它的管理面板使用Sonata Admin Bundle,当然想象您有一个名为Product的类,它拥有一些Images.Image也是一个类,您在Product中设置了一对多关系到Image类.因此,每个图像都归产品所有,因此您需要在Product Admin类中管理Image Admin.
所以你应该面对一些问题.你能告诉我怎么样?
1.删除产品对象时,将删除与该产品相关的所有图像.
2.当您在展示产品页面或添加新产品页面时,所有图像的图片显示在页面上.
(有没有使用奏鸣曲媒体包的解决方案呢?)
谢谢
我使用Document类处理Image上传:
FstQst\WebBundle\Entity\Document:
type: entity
table: null
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
updated: # changed when files are uploaded, to force preUpdate and postUpdate to fire
type: datetime
nullable: true
format:
type: string
length: 25
nullable: true
lifecycleCallbacks:
prePersist: [ preUpload ]
preUpdate: [ preUpload ]
postPersist: [upload]
postUpdate: [upload]
postRemove: [removeUpload]Run Code Online (Sandbox Code Playgroud)
我有另一个类使用Document为图像添加一些功能:
FstQst\WebBundle\Entity\Post:
type: entity
table: null
id:
id:
type: integer
id: true
generator:
strategy: …Run Code Online (Sandbox Code Playgroud)symfony ×3
.htaccess ×1
animation ×1
apache ×1
google-login ×1
libgdx ×1
php ×1
sonata-admin ×1