cakephp-1.2

Cakephp doesn't work after installing php5-curl package

扶醉桌前 提交于 2019-12-12 02:23:55
问题 I have an android app, it call a function of a web-server (using cakephp). And it return error like this 'call to undefined function curl_init()'. I do some search on google and try to fix that error by install php5-curl package, but after installing this package, the web-server doesn't work any more. it return Strict Standards: Non-static method App::core() should not be called statically, assuming $this from incompatible context in /var/www/postmail/cake/libs/debugger.php on line 429 Strict

How do you include the javascript helper in the ErrorHanlder?

百般思念 提交于 2019-12-12 01:54:18
问题 I have this custom error handler: `class AppError extends ErrorHandler { function error404($params) { $this->controller->layout = 'public'; $this->controller->set('title','Droptor Page Not Found'); parent::error404($params); } }` And I can't seem to use any layout that has this: $javascript->link('jquery',true) So the JS helper isn't loaded. But if I include this in the controller: var $helpers = array('javascript'); it still doesn't work. Nor does App::import('Helper', 'javascript'); 回答1:

What you would do to a URL that contains some special characters

馋奶兔 提交于 2019-12-11 14:05:57
问题 I am using cakePHP 1.26 I got an Input Text box which contains a URL and I want to submit the URL and stored it in the Database using Jquery AJAX. Here is the HTML part: <input type="text" id="testing" value="https://stackoverflow.com/questions/ask"> This is the JQuery part: var whatContent=$("#testing").val(); var curl="http://localhost:8080/test/grab/"+whatContent; $.ajax({ type: "POST", url: curl, success: function(data) { alert(data);} }); This is the code for the Action in the Controller

Pass a string in query without using quotes ''

丶灬走出姿态 提交于 2019-12-10 16:52:15
问题 I have this code for the query: $conditions[]=array('codiceBiblio IN (?)'=> $tot); Where $tot is a string (eg: 2345,5657,4565,5678). In this case, the query will be: SELECT [...] WHERE codiceBiblio IN ('2345,5657,4565,5678') But it will returns just the first record. So it sould be: SELECT [...] WHERE codiceBiblio IN (2345,5657,4565,5678) How can I do it? How the query is built I have this code for a query: // General Query $conditions = array( 'editore LIKE' => "%$e%", 'titolo LIKE' => "%$t%

CakePHP 1.2.x - Ajax Pagination 'Next Page' Does Not Update, Stays on 2

眉间皱痕 提交于 2019-12-10 15:26:02
问题 Good day all, I am extremely comfortable in using CakePHP 2.x but am having to work on a much older CakePHP 1.2.x app at the moment. I have implemented an Ajax pagination, which works perfectly fine for the first page, however the 'Next Page' link never does go past page 2. So even once page 2 is loaded, my paginator's next link still remains 'page:2'. The difference is that my paginator links are GLOBAL. I do not load the pagination links as part of the new DOM injected HTML. The paginator

about HMVC in codeigniter and cakephp?

你。 提交于 2019-12-07 18:26:10
问题 i heard today from my friend about HMVC in codignitor..i surprise for this feature..it is very helping in the big projects .. and i am Sad because i cant found any article or anything tell me there are HMVC in cakephp..so i have two questions.. Anyone have idea for HMVC in cakephp? Is these Brings me to learn codignitor ? Do the plugins, such as HMVC? login example in codignitor HMVC <?php hmvcExample/application/modules/login/controllers/ hmvcExample/application/modules/login/models/

How to include javascript in cakephp 1.3?

只谈情不闲聊 提交于 2019-12-06 15:54:05
问题 Wait moment this question not duplicated..it is sample and difficult at the same time. This simple problem make me crazy.. http://www.mediafire.com/?2vi2kc7tpqiw1to This is slide code contain CSS, HTML, jQuery code. This slide works fine, but when I include this slide in cakephp it is not working. I put jQuery files and CSS in webroot and put the code to include in layout/default.ctp like this echo $javascript->link('jcookie.js'); echo $javascript->link('jquery-1.3.2.min.js'); echo

how to create dynamic navigation menu cakephp

て烟熏妆下的殇ゞ 提交于 2019-12-06 09:01:32
问题 How can I build navigation menu from categories and sub categories, like this: http://mysite/categories/view/1/2 I tried menu builder 1.01 but it only works for acl users. I also read this tutorial, but it was not helpful. 回答1: Your first link doesn't work. Frankly, I'm not even sure I understand what you're trying to do. The second link you supplied - I admit I only looked at the first code snippet - doesn't use a database table. If you want your menu to be dynamic, as in based off

How do I query data in CakePHP using HABTM relationships?

限于喜欢 提交于 2019-12-05 23:49:15
问题 I'm working on a CakePHP 1.2 application. I have a model "User" defined with a few HABTM relationships with other tables through a join table. I'm now tasked with finding User information based on the data stored in one of these HABTM tables. Unfortunately, when the query executes, my condition is rejected with an error about a missing table. Upon inspection it seems that CakePHP is not including any of the HABTM tables in the select statement. My User HABTM relationship is as follows: var

Names of HTML form naming conventions

徘徊边缘 提交于 2019-12-05 21:35:22
问题 In Rails and CakePHP1.2, forms tend to include input elements with names like the following: <input name="comment[author]" /> Is there a formal name for the notation used in the "name" attribute? Likewise, in CakePHP1.1 I do believe that the same would have looked like this: <input name="comment/author" /> Again, is there a formal name for the notation used in the "name" attribute? 回答1: in cake php, the naming scheme is in multidimensional array access format, though i'm not really sure what