╃巡洋艦㊣ 2011-03-03 18:06:00 8967次浏览 5条评论 0 0 0

不同的PHP安装环境可能使用不同php.ini-CLI PHP(命令行PHP解析器)。因此,在运行modelcrud命令使用yiic shell,即使确认你已经开启PDO和相应的数据库驱动,你可能会遇到错误像“YiiBase::include(PDO.php):failed to open stream...” 或者 “...could not find driver”。

要解决这个问题,请再检查你的CLI PHP配置。你也可以使用以下的命令行确保你的CLI PHP是使用指定的php.ini文件:

php -c path/to/php.ini protected/yiic.php shell
  • 评论于 2011-08-08 19:12 举报

    没指定index.php webroot/index.php

  • 评论于 2012-02-25 09:57 举报

    哪儿有下载的呢

  • 评论于 2012-05-02 16:29 举报

    哈哈 如何学习YII呢

  • 评论于 2012-05-08 10:39 举报

    利用这个例子,使用SMTP作为发送的方法,在控制器创建一个component:

    <?php
    $message = 'Hello World!';
    $mailer = Yii::createComponent('application.extensions.mailer.EMailer');
    $mailer->Host = <your smtp host>;
    $mailer->IsSMTP();
    $mailer->From = 'wei@example.com';
    $mailer->AddReplyTo('wei@example.com');
    $mailer->AddAddress('qiang@example.com');
    $mailer->FromName = 'Wei Yard';
    $mailer->CharSet = 'UTF-8';
    $mailer->Subject = Yii::t('demo', 'Yii rulez!');
    $mailer->Body = $message;
    $mailer->Send();
    

    上面的是写在哪里的?components下吗?怎么和写在控制器的代码那么像?

    'components'=>array(
       'mailer' => array(
          'class' => 'application.extensions.mailer.EMailer',
          'pathViews' => 'application.views.email',
          'pathLayouts' => 'application.views.email.layouts'
    ),
    

    上面这些又是写在哪里的?控制器吗?

    'pathViews' => 'application.views.email',
    'pathLayouts' => 'application.views.email.layouts'
    

    这两个路径是什么路径啊,不明白啊

  • 评论于 2016-11-02 16:07 举报

    ......................

您需要登录后才可以评论。登录 | 立即注册