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

[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.
#12

[eluser]Tommy_DK[/eluser]
When I try to find the css file through the url the only thing that works is:
http://localhost.example.dk/system/appli.../style.css

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

[eluser]Unknown[/eluser]
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?
#14

[eluser]Gavin Blair[/eluser]
@Tommy_DK:

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

/my_site
/system
/images
/style
/user_guide
index.php

This will make including javascript and images easier.

@grudman:

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
#15

[eluser]Tommy_DK[/eluser]
@Gavin Blair

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

[eluser]Gavin Blair[/eluser]
@Tommy_DK:

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




Theme © iAndrew 2016 - Forum software by © MyBB