Welcome Guest, Not a member yet? Register   Sign In
View loses the path as the case of the controller call
#1

(This post was last modified: 04-06-2015, 11:49 AM by smallbug.)

Hi All!

I'm using the controller:

PHP Code:
public function test() {
 
$this->load->view('messages_view');


to call the view-page "messages_view.php", which shows a picture:

Code:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>CodeIgniter!</title>
    </head>
    

    <body>
        <div>
            <img src="../../image/app/mypic.jpg"  />
        </div>
    </body>
</html>

By sending: http://localhost/testproject/index.php/employee/test/
It works fine!

But if I have transfer parameters like:

PHP Code:
public function test($var1$var2) {
 
// ...
 
$this->load->view('messages_view');


By sending: http://localhost/testproject/index.php/e...e/test/1/2


the messages_view.php loses the path to the picture! It seems that the deep of the path depends on the amount of the called transfer parameters.

How could I resolve this situation?
Reply


Messages In This Thread
View loses the path as the case of the controller call - by smallbug - 04-06-2015, 11:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB