
Untitled
By: a guest on
Aug 5th, 2012 | syntax:
None | size: 0.45 KB | hits: 10 | expires: Never
Passing slashed argument to requestAction in CakePHP
public function myAction($name) {
$data = unserialize( file_get_contents( $name) );
return $data;
}
$f="/home/myaccount/file.txt";
$g = $this->requestAction( array( 'controller' => 'myController',
'action' => 'myAction' ), $f );
$g = $this->requestAction('/myController/myAction', array('pass' => urlencode($f));
$g = $this->requestAction('app/myController/'.urlencode($f));