问题标签 [cakephp-1.2]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - 数组值意外更改
我正在使用 cakephp 1.2,并且我有一个数组,即使该变量没有被操纵,它的值似乎也发生了变化。下面是给我带来麻烦的代码。
请注意 - 更新更改变量名称对结果没有影响。
}
我得到以下输出:
我数组中的值发生了变化,我不知道为什么?
有什么建议么?
cakephp - Empty data was able to be stored to the Database in CakePHP even if "Not Null" had been specified
I was doing some self learning on CakePHP 1.26 with Mysql 5.
I got a simple table with only one field and had applied "Not Null" to this field.
This field in the table was corresponding to a Input text box in a HTML form.
I tried not to enter anything into the Input text field, and then
I saw that empty data was able to be stored into the Table even if "Not Null" had been applied to this field.
I am confused of this result. Could you help me please?
cakephp - PHP Eclipse - 导入现有的 CakePHP 项目
我正在尝试将现有的 Cake 1.2 项目导入 PHP Eclipse(Galileo 构建的最新一体化下载) - 我认为我没有正确理解 Eclipse:
1) 我在我的网络根目录 C:\Program Files\xampp\htdocs 上创建了工作区 2) 我已经创建了新项目 C:\Program Files\xampp\htdocs\EclipseCake
...如何将现有的蛋糕项目导入我的新项目(EclipseCake)?
我尝试了配置包含路径 -> 项目 -> 添加...但没有出现文件浏览器。我显然误解了这一点。
cakephp - JQuery AJAX 返回了太多我没有请求的数据
我在这个 URL 中使用 CakePHP 1.26 和 CDN JQuery:http: //ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
在 HTML 网页中,我有这些代码行:
});
在 PHP 页面中,我又得到了几行代码:
如您所见,Avail 函数将返回零或一。但是服务器返回了一些冗余数据,
我在警报框中看到的是这样的(而不是 0 或 1):
不,导致问题的不是缺少的控制器。
cakephp - 对 cakePHP 中的 $this 感到困惑
我在 cakePHP 1.26 的模型中得到了几行代码:
上面的代码已经过测试,可以在我的数据库中使用。
但是,我不确定我是否能很好地理解它,
所以,我以其他方式重新编写了代码,然后它就无法正常工作。
为什么第二种方法行不通?
php - 表单助手字符串 concat 在 cakephp 中将零转换为未设置
这让我打败了。我正在尝试在 cakePHP 1.2.5 和 PHP 5.3.2 中创建一个字段数组,该数组从零开始。在第一次迭代中,$count == 0。由于某种原因,字符串连接似乎将其转换为 null 或取消设置,然后蛋糕将解释为“在此处插入模型名称”,即:
我试过强制转换值,对其进行strval,单引号,双引号,双引号和{}无济于事。这是 PHP 特性、CakePHP 的不鲁棒性还是我很笨?
cakephp - 如果(某事)与如果(某事===真)
我正在对 cakephp(1.26 版)进行一些自学。
我有一个简单的 HTML 输入文本字段,如下所示:
输入文本框字段中的值已根据数据库进行检查。
如果该值与存储在数据库中的数据匹配,它将返回 true。
这是代码:
当我对上面的代码稍作改动时,我遇到了一个问题,
但后来它无法工作:
有人可以帮忙吗?
cakephp - $session->flash()
I am using cakePHP v1.26. In the default.ctp file, I got a single of this code in it:
I came a corss a web site in which the author suggested using this instead:
I do not understand what this line of code is doing:
what is "Message.flash" in this case?
Is "Message.flash" a custom variable or
a built-in varibale which has been predefined in cakePHP?
cakephp - 非对象上的成员函数 check()
我正在使用 cakePHP 1.26。在 .ctp 文件中,我有一些类似这样的代码:
但是我得到了这个错误:
致命错误:在第 10 行的 /home/vol12/mysite.com/htdocs/app/views/layouts/testing1.ctp 中的非对象上调用成员函数 check()
我可以在 .ctp 文件中使用 Check 方法来检查会话是否存在?
cakephp - 在 cakePHP 的会话中存储消息的变量是什么?
我正在使用 cakePHP 1.26。
我在控制器中得到了这行代码:
这行代码完美运行,但我不确定是否有一个变量来
存储消息:cakePHP 中的“helloworld”。
如果是,我可以更改此变量的名称吗?
以及如何检查存储此消息的变量?