What do you mean by, "view controller"? It appears to me that
TesterController is a "controller". There doesn't seem to be any view
involved here.

What is tester.php? Is it your model class?

If testCall is just a function you want globally available, you can
put it in bootstrap.php. If you need something much more complex,
consider creating a Vendor class.

On Fri, Jan 16, 2009 at 3:33 PM, [email protected]
<[email protected]> wrote:
>
> Can I call a function from a php file from a view controller? I tried
> it with an include and it didn't work...Here is a sample of what I
> want...
>
> // File tester.php
> <? function testCall ()
> { return 100;}
> ?>
>
> // File view controller
> <?php
> class TesterController extends AppController
> {
>
>     function index()
>     {
>          $x = testCall();
>     }
> }
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to