小编doy*_*y44的帖子

未捕获的异常'Zend_Controller_Dispatcher_Exception'

我在zend框架上收到以下错误:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php:245 
Stack trace: 
#0 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(946):Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))  
#1 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(212): Zend_Controller_Front->dispatch()  
#2 F:\wamp\www\helloworld\web_root\index.php(10): Zend_Controller_Front::run('../application/...')  
#3 {main} thrown in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php on line 245

造成这种情况的原因是什么,我该如何解决?

zend-framework

5
推荐指数
2
解决办法
2万
查看次数

在Doctrine Symfony中使用UNION进行SQL查询

我有一个关于在Doctrine Symfony中翻译SQL查询的问题.我想做一件事:

SELECT m.*
FROM member m
INNER JOIN (
  SELECT id_member
  FROM friend
  WHERE id_friend=99
  UNION
  SELECT id_friend
  FROM friend
  WHERE id_member=99
) a ON m.id=a.id_member 
WHERE m.visible=1
Run Code Online (Sandbox Code Playgroud)

在该示例中,我搜索用户99的所有朋友.

我的桌子:

成员:(id,name,visible)
朋友:(id,id_member,id_friend,active)

精度:我想使用Symfony寻呼机.

一个办法 ?谢谢 !

sql pagination doctrine symfony-1.4

5
推荐指数
1
解决办法
8750
查看次数

PHP SOAP:未将对象引用设置为对象的实例

我需要你的帮助

我必须使用 Web 服务 SOAP 中的 PHP 函数 请求 XML 如下

<OTA_HotelDescriptiveInfoRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1">
   <POS>
      <Source AgentSine="user" AgentDutyCode="pass" />
   </POS>
   <HotelDescriptiveInfos>
      <HotelDescriptiveInfo ChainCode="H4U" HotelCode="696"/>
   </HotelDescriptiveInfos>
</OTA_HotelDescriptiveInfoRQ>
Run Code Online (Sandbox Code Playgroud)

这是我的 PHP 代码:

$soapClient = new SoapClient("http://otatest.apixml.com/dispatcher.asmx?WSDL");
$header = new SOAPHeader('http://xmlota.wspan.com/webservice/', 'authentication', array('username' => 'user', 'password' => 'pass'));
$soapClient->__setSoapHeaders($header);

$param['POS']['Source']['AgentSine'] = 'user';
$param['POS']['Source']['AgentDutyCode'] = 'pass';
$param['HotelDescriptiveInfos']['HotelDescriptiveInfo']['ChainCode'] = 'H4U';
$param['HotelDescriptiveInfos']['HotelDescriptiveInfo']['HotelCode'] = '696';

$response = $soapClient->sendOTAHotelDescriptiveInfo($param);
Run Code Online (Sandbox Code Playgroud)

这是我尝试了几天但无法解决的错误

致命错误:未捕获的 SoapFault 异常:[soap:Server] System.Web.Services.Protocols.SoapException:服务器无法处理请求。
---> System.NullReferenceException:未将对象引用设置为对象的实例。在 H4U.Webservices.OTA.SoapDispatcher.sendOTAHotelDescriptiveInfo(OTA_HotelDescriptiveInfoRQ OTA_HotelDescriptiveInfoRQ)
--- 内部异常堆栈跟踪结束 ---
在/home/dimavoya/public_html/soap/soap.php:43

堆栈跟踪:
#0 /home/dimavoya/public_html/soap/soap.php(43): SoapClient->__call('sendOTAHotelDes...', Array)
#1 /home/dimavoya/public_html/soap/soap.php(43): …

php soap

5
推荐指数
0
解决办法
1341
查看次数

使用Swift邮件程序发送邮件时出现错误501

<?php

  require_once '../plugin/swift/lib/swift_required.php';

  // Create the Transport
  $transport = Swift_SmtpTransport::newInstance('pod51003.outlook.com',587,'tls')
    ->setUsername('user@connect.polyu.hk')
    ->setPassword('pw')
    ;

  // Create the Mailer using your created Transport
  $mailer = Swift_Mailer::newInstance($transport);

  // Create a message
  $message = Swift_Message::newInstance('Wonderful Subject')
    ->setFrom(array('john@doe.com' => 'John Doe'))
    ->setTo(array('foodil@hotmail.com', 'foodil@yahoo.com.hk' => 'A name'))
    ->setBody('Here is the message itself')
    ;

  // Send the message
  $result = $mailer->send($message);

  printf("Sent %d messages\n", $result);

?>
Run Code Online (Sandbox Code Playgroud)

结果是:

Fatal error: Uncaught exception 'Swift_TransportException' 
with message 'Expected response code 250 but got code "501", with message "501 5.5.4 Invalid …

php

4
推荐指数
1
解决办法
9758
查看次数

不能在ZF2中使用Zend_Debug :: dump.我可以吗?

我正在使用ZF2.0.0Beta3的骨架应用程序.

所以,通常我会使用Zend_Debug :: dump($ someVar); 但是,在ZF2中,它似乎不包括zend类.

The error is: Fatal Error: Class 'Zend_Debug' not found..
Run Code Online (Sandbox Code Playgroud)

这可能是一个非常基本的问题,但是包含该课程的最佳方式是什么?我要放require_once('path/to/Debug.php');吗?

zend-framework2

4
推荐指数
2
解决办法
8191
查看次数

如何获取当前时间(OpenEdge)

我正在进行编码(又名OpenEdge ABL).

我有一个持有时间的变量,我想弄清楚它是否大于当前时间.
但我在我阅读的文档中找不到任何内容,告诉我如何检索当前的Time in Progress.
我只能找到有关检索当前日期的信息(使用Today关键字).
顺便说一句,如果使用Today关键字包含日期的时间部分,那很好,但是我需要知道如何仅隔离时间部分.

谢谢.(注意,我所指的时间是一个整数,表示自午夜起的秒数)

progress-4gl openedge

4
推荐指数
1
解决办法
1万
查看次数

如何在MPDF中使用Font Awesome?

我正在使用Zend Framework并使用mpdf创建PDF.
我试图使用fontawesome来表示一些文章,但字体真棒的字体下面没有正确呈现代码.

$stylesheet =  file_get_contents("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css");
$stylesheet .= file_get_contents("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");

$this->mpdf->WriteHTML($stylesheet,1);
$this->mpdf->WriteHTML($html,2);
$this->mpdf->allow_charset_conversion = true; 
$this->mpdf->charset_in = 'windows-1252';
$this->mpdf->Output();
Run Code Online (Sandbox Code Playgroud)

我在html中使用的代码

<span class="company-name">&#xf21b; name of the company</span>
Run Code Online (Sandbox Code Playgroud)

提前致谢.

zend-framework mpdf font-awesome

4
推荐指数
2
解决办法
4614
查看次数

Lucene在zf2中搜索

Lucene搜索库是否已从ZendFramework 2中删除?因为我在这里找不到它

zend-search-lucene zend-framework2

3
推荐指数
1
解决办法
4527
查看次数

ZF2 - 需要在特定条件失败时显示特定错误消息

我正在使用ZF2表单验证.我必须验证两个字段USERNAME和PASSWORD.一切都很好,但我得到的消息

Please enter username.
Username can not be less than 3 characters.

Please enter password.
Password can not be less than 6 characters.
Run Code Online (Sandbox Code Playgroud)

如果用户未输入任何值,则仅显示此消息

Please enter username.    
Please enter password.
Run Code Online (Sandbox Code Playgroud)

我不想在失败时显示字段上的所有错误消息.

提前致谢.

php zend-framework2

3
推荐指数
1
解决办法
2029
查看次数

ZF2表单中的按钮内容

如何编辑Button元素(ZF2表单)的按钮内容?我可以设置一个标签,但我想在其中插入一些HTML代码.

    $this->add(array(
        'type' => 'Button',
        'name' => 'submit',
        'options' => array(
            'label'   => 'Modifica',
        ),
        'attributes' => array(
            'type'  => 'submit',
            'class' => 'btn btn-warning'
        )
    ));
Run Code Online (Sandbox Code Playgroud)

谢谢

zend-form zend-form-element zend-framework2

3
推荐指数
2
解决办法
6432
查看次数