cbcram Posted March 26, 2011 Report Share Posted March 26, 2011 Hi, I'm watching the chapter 4 of Advance PHP. I've got a problem. When I create a new class controller (i.e. IndexController) the public function dispatch() doesn't do anything. In the video class it works fine. It seems that this function is executed automatically when the class is created, isn't it? And why doesn't it works in my computer? I'm using PHP Version 5.3.3-7+squeeze1 on Apache 2.2. I also take to ask how the dispatch function uses the uri parameter, which is never passed to the class neither to the function? Thanks, for your attention and for the videos -they are really great!!. Marc Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 26, 2011 Report Share Posted March 26, 2011 I haven't yet watched the advanced PHP videos, so I'm not sure how helpful I'll be able to be. However, if you post the code you are working with (or, if you need to, compress all of your files into a .zip archive and post a link to it/upload it to your post) I may be able to help. Have you downloaded the source files for the videos and compared your files against the source files? Quote Link to comment Share on other sites More sharing options...
cbcram Posted March 27, 2011 Author Report Share Posted March 27, 2011 Solved!!! Sorry it was my fault. In my video doesn't appear the last line of the index.php (public function) so I missed to include $controller->dispatch($uri). There's no problem, dispatch isn't a phantom function, and the recived parameters are passed to it in normal way. I've seen in the solution in chapter 5, where the missing line in chapter 4 appears. Sorry to all to make spend your time, and thank you all. Marc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.