Category Covered

How to allow sub folder on cakephp by htaccess  

I have a project on main domain which is developed using cakephp framework and now i want to add another sub folder for testing another project which is devloped in smarty technology. Here is the htaccess of the main project <IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/
 
By: Tech writer  |   Total Read: 872  |   Read more..

git the file will have original ending  

If you get error like "The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in Gemfile." Run the following command, Hope it will work. git config core.autocrlf false
 
By: Tech writer  |   Total Read: 1173  |   Read more..

Adobe Photoshop serial number  

If you are looking for a serial number of Adobe Photoshop you can use the following one.   Serial Number: 1045-1302-5692-5842-1244-7027 Authorization code: 0268 4720 9657 7659 8460    
 
By: Tech writer  |   Total Read: 917  |   Read more..

CakePHP Display multiple fields in a single drop down find list  

I want to show two fields value on the dropdown of cakephp which are retriving by find list query. For example i want to show first_name and last_name in my select dropdown.   Then use the folloing tested code.   $users= $this->User->find('all', array('conditions'=> array('User.is_doctor'=>1), 'fields'=>array('User.id', 'User.first_name', 'User.last_name')));   $users = Set::combine($users, '{n}.User.id', array
 
By: Tech writer  |   Total Read: 1724  |   Read more..

Jquery Full Calender not working on internet explorer  

Hello, Last few hours i was trying to solve an issue on jquery full calender. Every where it was working but when i went to test internet explorer i was thundered because it was not working. So try to figure out. I Saw some error like that   Line: 220
Char: 15
Error: Expected identifier, string or number
Code: 0 Finally i got the issue why its not working on internet explorer. Its for a comman(,). As i made it dynami
 
By: Tech writer  |   Total Read: 1910  |   Read more..

unbindModel not working on cakephp paginate  

On cakephp 1.2 or cakephp 1.3 you will see that your unbindmodel is not working on paginate.  Model->unbindModel() works only for the very next next operation of the model. So it works perfectly for find query. but paginate has more than one operation so it does not work. But it does not mean that it will not work. Like the following query send false as a second parameter.  $this->DoctorAppointment->Customer->unbindMode
 
By: Tech writer  |   Total Read: 1708  |   Read more..

cakephp allow sub directory by htaccess  

I have two project one main project which is running fine but now i want to run another cakephp project on the same domain.
So you are in the write place this tutorial will help you to run a cakephp on a sub domain

1. First you have change the .htaccess on  /httpdocs/ <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteRule    ^$ cake_sub_project/app/webroot/    [L
 
By: Tech writer  |   Total Read: 5125  |   Read more..

CakePHP update all with conditions  

If you want to update some conditionals fields on cakephp then hope it will help you.   $this->DoctorSpeciality->updateAll(array("is_default"=>0), array('DoctorSpeciality.user_id'=>$doctor_id, 'DoctorSpeciality.id !='=>$id));   Here first array "array("is_default"=>0)" is the field and vale you want to update   2nd array is the conditions that you want check before update.
 
By: Tech writer  |   Total Read: 1557  |   Read more..

How to change the default url in CakePHP  

How to change the default url in CakePHP

Just go directly to the router.php in your website. Here you need to change the following code:

Router::connect('/', array('controller' => ' contents', 'action' => 'lists'));

Change the controller name and action as you needed. Suppose you want open directly the login page when your website launches….then you just need to change the controller name
 
By: mimosa  |   Total Read: 913  |   Read more..

php function that return the number of days in a month  

Here is a date function that will give output from 28 to 31 which is normally the days on a months. t            
Number of days in the given month 28 through 31 <?php echo date("t");?>
 
By: Tech writer  |   Total Read: 917  |   Read more..
Top 15 Posts
Google+