Facebook signed request not providing all information

I've placed in the SDK properly into my CI setup, and I run a bit of code like this: if (!empty($_POST['signed_request'])) { $signed_request = $_POST['signed_request']; } list($sig, $payload) = explode('.', $signed_request, 2); $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true); var_dump ($data); I'm only receiving back some of the informat

Facebook签署的请求不提供所有信息

我已将SDK正确放置到CI设置中,然后运行一些代码,如下所示: if (!empty($_POST['signed_request'])) { $signed_request = $_POST['signed_request']; } list($sig, $payload) = explode('.', $signed_request, 2); $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true); var_dump ($data); 我只接收这些代码中的一些信息,如下所示: array(6){[“algorithm”] => stri

Symfony2 TranslatorListener local culture issue

I am using redirection from symfony 1 to symfony 2.6.9 with authenticated user. The db is the same. I am using sf1 action to set the web page culture. In sf2 controller I can get the correct culture via $culture = $this->getRequest()->getLocale() but the translator instance uses the default variable. here are the kernel.request event listeners from app/console debug:event-dispatche k

Symfony2 TranslatorListener本地文化问题

我正在使用从symfony 1到symfony 2.6.9的重定向以及经过验证的用户。 数据库是一样的。 我正在使用sf1操作来设置网页文化。 在sf2控制器中,我可以通过获取正确的文化 $culture = $this->getRequest()->getLocale() 但翻译器实例使用默认变量。 以下是来自app/console debug:event-dispatche kernel.request的kernel.request事件侦听器app/console debug:event-dispatche kernel.request : | #1 | Nelmio Co

Detection of a bundle by AppKernel.php symfony 2.5.6

i am having an issue with AppKernel and the bundle detector. I am working in 2.5.6 Indeed, i have this error: Bundle "mainBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your AppKernel.php file? But here is my AppKernel.php: <?php use SymfonyComponentHttpKernelKernel; use SymfonyComponentConfigLoaderLoaderInterface;

通过AppKernel.php检测一个bundle symfony 2.5.6

我遇到了AppKernel和bundle检测器的问题。 我在2.5.6工作 确实,我有这个错误:Bundle“mainBundle”不存在或者未启用。 也许你忘了将它添加到你的AppKernel.php文件的registerBundles()方法中? 但是这里是我的AppKernel.php: <?php use SymfonyComponentHttpKernelKernel; use SymfonyComponentConfigLoaderLoaderInterface; class AppKernel extends Kernel { public function registerBundles() {

Attempted to call method "getDoctrine" on class (Symfony)

I am trying to create small application to read the record from the table by id using symfony/doctrine. My steps: Created controller (GSOrderBunndleControllerCustomerCuntroller.php), route. Testing URL - it is working; Creating Entity for customer table (GSOrderBundleEntityCustomer.php) with columns and getters/setters; 3) Created GSOrderBundleEntityCustomerRepository.php (I am not sure w

试图在类(Symfony)上调​​用方法“getDoctrine”

我正在尝试创建一个小应用程序,使用symfony / doctrine通过id从表中读取记录。 我的步骤: 创建控制器(GS OrderBunndle Controller CustomerCuntroller.php),路由。 测试网址 - 它正在工作; 使用列和getter / setter为客户表(GS OrderBundle Entity Customer.php)创建实体; 3)创建GS OrderBundle Entity CustomerRepository.php(我不知道为什么我还需要它,它是自动生成的)。 源代码: namespace GSO

Symfony2 PHP 5.4.4 Cannot change the ID of an active session

Currently, we install our web application in Symfony2 and we find a blocking problem. linux Debian Wheezy PHP 5.4.4 Symfony version 2.1.10-DEV - app/dev/debug The fatal error to the exception : vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/AbstractProxy.php throw new LogicException('Cannot change the ID of an active session'); Stack Trace :

Symfony2 PHP 5.4.4无法更改活动会话的ID

目前,我们在Symfony2中安装我们的Web应用程序,并发现阻塞问题。 linux Debian Wheezy PHP 5.4.4 Symfony版本2.1.10-DEV - app / dev / debug 异常的致命错误: vendor / symfony / symfony / src / Symfony / Component / HttpFoundation / Session / Storage / Proxy / AbstractProxy.php throw new LogicException('无法更改活动会话的ID'); 堆栈跟踪 : 在第484行的kernel.root_dir / cache / d

Setters/Getters, Visibility [ OOP ] in PHP

I'm in the process of reformatting my class ( seen below ) - I think I made the mistake of setting everything with the same visibility in my class, whereas properties should really be private and getters/setters should be public in most cases. To grab a property I just do $path->propertyname but I've noticed its more practical to have setters/getters. If I were to implement getters,

Setters / Getters,可见性[OOP] in PHP

我正在对我的班级进行格式化(见下文) - 我认为我犯了一个错误,即在我的班级中设置了所有具有相同可见性的内容,而属性应该是私人的,并且在大多数情况下,getter / setter应该是公开的。 为了获得一个属性,我只是做了$ path-> propertyname,但我注意到它更具实用性,让setter / getters成为可能。 如果我要实施获得者,我应该为每个财产制定一个,还是我可以为整个班级制定一个? 所以例如说我想获得控制器名称... p

NuSoap vs PHP Soap Library. Where is getError?

I'm converting an old code which use NuSoap to PHP Soap Library. But method getError in NuSoap PHP seems not exist in PHP Soap Libary and I get this error: Fatal error: Uncaught SoapFault exception: [Client] Function ("getError") is not a valid method for this service in index.php:33 Stack trace: #0 index.php(33): SoapClient->__call('getError', Array) #1 index.php(33): SoapClient->ge

NuSoap vs PHP肥皂库。 getError在哪里?

我正在将使用NuSoap的旧代码转换为PHP肥皂库。 但NuSoap PHP中的方法getError似乎不存在于PHP Soap Libary中,我得到这个错误: Fatal error: Uncaught SoapFault exception: [Client] Function ("getError") is not a valid method for this service in index.php:33 Stack trace: #0 index.php(33): SoapClient->__call('getError', Array) #1 index.php(33): SoapClient->getError() #2 index.php(63): pay() #3 {mai

Location of template rendering in Symfony2

Where in Symfony2 is template rendering launched? I am asking for the most general class/method handling the template logic, I guess by launching the configured template engine, like Twig for example. Or to put the question even more concretely ... a controller delegates the layout to a specific template, like example.html.twig ... where is this filename used and passed for the first time?

在Symfony2中模板渲染的位置

Symfony2中的模板渲染是在哪里启动的? 我要求处理模板逻辑的最普通的类/方法,我想通过启动配置的模板引擎,例如Twig。 或者更具体地提出这个问题......一个控制器将布局委托给一个特定的模板,比如example.html.twig ......这个文件名在第一次使用和传递的地方在哪里? 在最常见的情况下,假设你使用的是FrameworkBundle(如果你使用的是标准版,那么你的render函数只需调用$this->container->get('templating

I need help to setup facebook application

I have some problem to setup application on facebook, ok what is exactly problems? Im load script <script src="http://connect.facebook.net/en_US/all.js"></script> And this $(document).ready(function () { // Pocetak callbacks funkicja $("#oceni_fbPrijatelje").click(function() { $("#sidecenter ,#sidedesno,#sidelevo").addClass("fb_over"); FB.init({ appId : 'xxxxxx

我需要帮助来设置Facebook应用程序

我有一些问题在Facebook上设置应用程序,确定究竟是什么问题? 我加载脚本 <script src="http://connect.facebook.net/en_US/all.js"></script> 和这个 $(document).ready(function () { // Pocetak callbacks funkicja $("#oceni_fbPrijatelje").click(function() { $("#sidecenter ,#sidedesno,#sidelevo").addClass("fb_over"); FB.init({ appId : 'xxxxxxxxx959971', }); //

Embed video javascript code from database in PHP

This is probably a pretty simple thing. I am testing out several video hosting services where I host the videos and use their embed code to display on my site. Now this embed code is stored in the database and is associated with each topic. So on a given page there could be 20 topics. So when a user clicks on any topic - using ajax I pull the embed code and display it in a given div. This

在PHP中嵌入来自数据库的视频JavaScript代码

这可能是一件非常简单的事情。 我测试了几个视频托管服务,我托管视频并使用他们的嵌入代码在我的网站上显示。 现在这个嵌入代码被存储在数据库中并与每个主题相关联。 所以在给定的页面上可能有20个主题。 所以当用户点击任何主题时 - 使用ajax我拉动嵌入代码并将其显示在给定的div中。 这适用于在youtube和其他服务中使用或类似的嵌入代码。 但也有其他人给你一个JavaScript代码嵌入如下所示 <script type = "text