If you only need a function for one specific page, you can define it as a member function within that page's class. for example:
PHP Code:
class indexController() {
function indexAction() {
//code here
$this->myOwnFunction();
}
function myOwnFunction() {
//your code here
}
}