Welcome Guest, Not a member yet? Register   Sign In
Only absolute links?

[eluser]Tom Glover[/eluser]
I use Site url for calls to controllers and functions, but i use base url to call folders and image/js files.

When I try to find the css file through the url the only thing that works is:

Is there a nicer/shorter way to access the file?

I have also problems with including files.

Example I want include some file from controllers dir to some file in views dir.

When I write;

include '../controllers/prices_i.php';

It doesnt work. (prices_i.php is my file in controllers dir).

When I try to reach that file with absolute path I get the same thing - nothing.

Some suggestions?

[eluser]Gavin Blair[/eluser]

Keep .js and image files outside of the system folder. The top level will look something like this:


This will make including javascript and images easier.


I'm not sure why you are including a controller in a view, it seems to break MVC methodology. It would be easier to include an external file if it was in the views folder.

include 'prices_i.php';

would include /views/prices_i.php

@Gavin Blair

Thank you very much for the tip. What do you use the /my_site folder to?

[eluser]Gavin Blair[/eluser]

When I was editing it, there was spacing... /my_site was the parent folder

Theme © iAndrew 2016 - Forum software by © MyBB