Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 0.45 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Passing slashed argument to requestAction in CakePHP
  2. public function myAction($name) {
  3.     $data = unserialize( file_get_contents( $name) );
  4.     return $data;
  5. }
  6.        
  7. $f="/home/myaccount/file.txt";
  8.  
  9. $g = $this->requestAction( array( 'controller' => 'myController',
  10.          'action' => 'myAction' ), $f );
  11.        
  12. $g = $this->requestAction('/myController/myAction', array('pass' => urlencode($f));
  13.        
  14. $g = $this->requestAction('app/myController/'.urlencode($f));