CakePHP: How to call an action of another controller

App::uses(‘AppController’, ‘Controller’); App::uses(‘EmployeesController’, ‘Controller’); class ReportingController extends AppController { public function some(){ $Employees = new EmployeesController; $Employees->constructClasses(); $Employees->areasAssigned();//areasAssigned function is in the Employees controller. } }

Sending multiple files in email using PHP

<?php // array with filenames to be sent as attachment $files = array(“emi_pdf/Self_Employee_1330438553.pdf”, “emi_pdf/Self_Employee_1330439327.pdf”,”emi_pdf/Self_Employee_1330438611.pdf”); // email fields: to, from, subject, and so on $to = “abc.kumar@gmail.com”; $from = “me@domain.com”; $subject = “send email with pdf attachment”; $message = “<p>Please see the attachment.</p>”; $headers = “From: $from”; // boundary $semi_rand = md5(time()); $mime_boundary = “==Multipart_Boundary_x{$semi_rand}x”; // … Read more