标签: cakephp

datepicker如何添加蛋糕php我们需要的步骤

*用于蛋糕php安装步骤的jquery日期选择器*

   php echo $this->Form->input("date", array('label' => "Date : ", 'type' => 'text', 'class' => 'fl tal vat w300p', 'error' => false , 'id' => 'select_date')); ?>
    <?php echo $this->Html->div('datepicker_img w100p fl pl460p pa', $this->Html->image('calendar.png'),array('id' => 'datepicker_img')); ?>
    <?php echo $this->Html->div('datepicker fl pl460p pa', ' ' ,array('id' => 'datepicker')); ?>
Run Code Online (Sandbox Code Playgroud)

php jquery cakephp

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

如何在Cakephp中使用IN运算符

对于CakePHP版本2.x. 如果$ trs是用户标识的数组,则不必将IN关键字置于条件中.您可以只将数组("Post.user_id"=> $ trs)和Cake添加IN运算符留给此查询.全线:

$ this-> Post-> find('all',array('conditions'=> array('Post.user_id'=> $ trs),'order'=> array('Post.created DESC')));

php sql cakephp

-2
推荐指数
1
解决办法
832
查看次数

在控制器中加载多个模型

我想在控制器中的特定功能中加载多个模型?

期待重复$ this-> loadModel('ModelName')方法.

cakephp cakephp-2.0

-2
推荐指数
1
解决办法
3545
查看次数

CakePHP/PHP Json解码URL响应

对于URL,我试图通过此API请求计算它的推文:

http://urls.api.twitter.com/1/urls/count.json?url=http://www.bbc.co.uk
Run Code Online (Sandbox Code Playgroud)

这(在浏览器中)返回以下Json:

{"count":216743,"url":"http:\/\/www.bbc.co.uk\/"}
Run Code Online (Sandbox Code Playgroud)

我可以手动解析响应:

$tweets = json_decode('{"count":216743,"url":"http:\/\/www.bbc.co.uk\/"}');
$this->set('tweets', $tweets->{'count'});
Run Code Online (Sandbox Code Playgroud)

当我输入URL而不是Json时,它不会请求任何数据.如何让以下工作?

$tweets = json_decode('http://urls.api.twitter.com/1/urls/count.json?url=http://www.bbc.co.uk');
$this->set('tweets', $tweets->{'count'});
Run Code Online (Sandbox Code Playgroud)

php twitter json cakephp

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

查找全部中的多个条件

我想在查找中输入某些条件(蛋糕上的“全部”。这是我的逻辑:

Traduction.traductions = my username AND Traduction.status = 1 OR 8    
OR,   Traduction.check1 = my username AND Traduction.status = 5 OR 2     
OR,   Traduction.check2 = my username AND Traduction.status = 6 OR 3    
Or,    Trauduction.editions = my username AND Traduction.status = 7 OR 3
Run Code Online (Sandbox Code Playgroud)

如果这些条件之一正确,他将显示内容

到目前为止,这是我的代码

    $conditions = array(
                'AND' => array(
                    array(
                        'OR' => array(
                            array('Traduction.traductions' => $this->Session->read('Auth.User.username')),
                            array('Traduction.status' => '1'),
                            array('Traduction.status' => '8')
                        )
                    ),
                'AND' => array(
                    array(
                        'OR' => array(
                            array('Traduction.check1' => $this->Session->read('Auth.User.username')),
                            array('Traduction.check1' => '5'), …
Run Code Online (Sandbox Code Playgroud)

cakephp conditional-statements

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

我怎样才能删除这些"|" 从我的分页

分页创建| 在每个号码后,我想删除它,但我无法找到在哪里和如何.

有人能帮我吗?

例如:

<< <1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9> >>

谢谢你的时间.

php mysql pagination cakephp

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

错误:在非对象文件上调用成员函数setFlash():C:\ wamp\www\CakePHP\app\Controller\PublishersController.php行:28

<?php
class PublishersController extends AppController
{

    public function index()
    {
        $this->set("publishers",
            $this->Publisher->find("all", array('order' => 'company_name ASC')));
    }

    public function view($id = null)
    {
        $this->Publisher->id = $id;
        $this->set('publisher', $this->Publisher->read());
    }

    function edit($id = null)
    {
        $this->Publisher->id = $id;
        if (empty($this->data))
        {
            $this->data = $this->Publisher->findById($id);
        }
        else
        {
            if ($this->Publisher->save($this->data))
            {
                $this->Session->setFlash('Publisher Updated Successfully');
                $this->redirect(array('action' => 'index'));
            }
        }
    }
}

?>
Run Code Online (Sandbox Code Playgroud)

cakephp

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

警告(2):strtotime()[function.strtotime]:依赖系统的时区设置是不安全的

Warning (2): strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for '5.5/no DST' instead [CORE\cake\libs\cache.php, line 570]
Code | Context

$settings = array(
 "engine" => "File",
 "path" => "C:\xampp\htdocs\cakephp\app\tmp\cache\persistent\",
 "prefix" => "cake_core_",
 "lock" => false,
 "serialize" => true, …
Run Code Online (Sandbox Code Playgroud)

cakephp

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

如何开始使用第一个框架 - CakePHP?

我决定用CakePHP开始冒险,它将成为我生命中的第一个框架,而且我对框架没有太多经验.

问题是,我应该如何以及从哪里开始?对于开始,我想用子页面等制作一个简单的页面.

我应该怎么开始?

php cakephp

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

CakePhp致命错误

请给我一个解决方案致命错误:在第17行的D:\ xampp\htdocs\blog\app\views\layouts\default.ctp中的非对象上调用成员函数writeBuffer()

cakephp

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