Jump to content

Php,dispatching Views


abdurahman

Recommended Posts

Hi,

I tried to correct the errors writing the code with the dispatching views when I want to finish i get this error

 

 

 

( ! ) Fatal error: Uncaught exception 'Exception' with message 'Please implement a function called publicAction' in C:\wamp\www\killerphp\com\killerphp\controllers\ControllerAbstract.php on line 25

( ! ) Exception: Please implement a function called publicAction in C:\wamp\www\killerphp\com\killerphp\controllers\ControllerAbstract.php on line 25

Call Stack

# Time Memory Function Location

1 0.0013 255856 {main}( ) ..\index.php:0

2 0.0044 272520 com\killerphp\controllers\ControllerAbstract->dispatch( ) ..\index.php:35

 

and my uri is http://localhost/killerphp/public/index/welcome

 

so the teachet jon use only http://killerphp/index/welcome as a localhost

I think the èroblem I have is directory because

for example :

I'm dispatching /viwes/index or views/test

so how I can fix this problem

Link to comment
Share on other sites

Hi,

on other way as clearly,

in the viedo KP5 dispatching views.

 

in the IndexController

when I want to call a welcome action in my uri local system (http://localhost/killerphp/public/index/welcome)

echo "I'm dispatching $uri";

is OK and print I'm dispatching killerphp/public/index/welcome

 

BUT!

when I write (echo "I'm dispatching .$this->action";

only can print I'm dispatching public insteed of I'm dispatching welcome.

 

 

that is the problem I would like to help me how can resolve.

 

Aman

Link to comment
Share on other sites

and my uri is http://localhost/killerphp/public/index/welcome

 

so the teachet jon use only http://killerphp/index/welcome as a localhost

To be honest, I'm not sure if I can help with this, since I haven't personally worked through that course. I'd suggest looking at the source files from the course.

 

Any reason your URL has "public" whereas the teacher's version doesn't? Ignoring the "localhost" difference, it seems like you are using different file structures, which would obviously cause different results.

 

the teachers: /killerphp/index/welcome as a localhost

yours: /killerphp/public/index/welcome

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...