Welcome Guest, Not a member yet? Register   Sign In
[Need help] it's strange
#1

[eluser]Leonard Yulianus[/eluser]
i am currently writing my personal page using CI. it works fine on my dev machine (localhost)

but when i'm trying to access it from another computer in the same network, it works but with no styles at all.

why could this happen? is there something wrong with my assets?
#2

[eluser]antiver[/eluser]
It's probably just an issue with the path you're using to include your stylesheets.

Code:
<link rel="stylesheet" href="/assets/site.css" type="text/css" />
This is basically what I use. What's the href you're using?
#3

[eluser]Leonard Yulianus[/eluser]
thanks for the quick reply.

it's all about the path after all. i am using absolute path (base_url()), maybe i'll just have to make it relative.
#4

[eluser]ontguy[/eluser]
use the ip address for your machine instead of localhost, $config['base_url'], and you still keep it absolute
#5

[eluser]antiver[/eluser]
I bet the base url isn't configured properly?

system/application/config/config.php

Make sure its not set to

Code:
$config['base_url'] = "http://localhost/";
or some other (relative) nonsense. In a development environment, you could change localhost to be the IP address of the web server.




Theme © iAndrew 2016 - Forum software by © MyBB