I’m trying to pass a string to requestaction.
in myController file:
public function myAction($name) {
$data = unserialize( file_get_contents( $name) );
return $data;
}
in my Views file:
$f="/home/myaccount/file.txt";
$g = $this->requestAction( array( 'controller' => 'myController',
'action' => 'myAction' ), $f );
How can I pass an argument having special characters?
Hope the following code will help you:
This link will guide you how to access the parameter in your controller’s action.