I have a problem with TinyMVC. I’m really new with this “MVC framework”.
I download the last version of TinyMVC here: http://www.tinymvc.com/download/
I just followed the guide and I have arrived on the controller documentation: http://www.tinymvc.com/documentation/index.php/Documentation:Controllers
I followed the instruction and I have created a hello.php file inside myapp/controllers/hello.php
This is the code of hello.php
class Hello_Controller extends TinyMVC_Controller
{
function index()
{
echo "Hello World.";
}
function time()
{
echo "The time is now.";
}
}
I also have put this .htaccess inside htdocs (where index.php is)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Now the problem is that seems tinyMVC is not loading the controllers correctly.
I just tried:
http://localhost/myproject/www (AND I SEE THE DEFAULT CONTROLLER correctly)
http://localhost/myproject/www/hello (I STILL SEE THE DEFAULT CONTROLLER)
http://localhost/myproject/www/hello/time (I get the follow error)
Error: 0
Message: Unknown controller method 'time'
File: C:\xampp\htdocs\myproject\tinymvc\sysfiles\plugins\tinymvc_controller.php
Line: 58
I do not thing it was wrong, but my controllers are not loaded correctly.
There is an issue with line 188 in TinyMVC.php.
Change file_exists to stream_resolve_include_path (File located at tinymvc/sysfiles/