Welcome Guest, Not a member yet? Register   Sign In
path instead of baseurl
#1

[eluser]Unknown[/eluser]
Hi

I’m new to CI ( great work, thx) an have following problem:
I don’t like use full url “http://www.mydomain.com/mypath/images/a.jpg” within links
I want use “/mypath/images/a.jpg”.

I need function like:

function baseurl_path(){
$base= base_url();
$f= ‘/.*’.$_SERVER[‘SERVER_NAME’].’/’;
$b= preg_replace($f, ‘’, $base);
return b;
}
Can I find it in CI or not?
#2

[eluser]InsiteFX[/eluser]
Why not use CodeIgniters HTML helper and the img tag.


InsiteFX
#3

[eluser]pbreit[/eluser]
Try setting base_URL to '/mypath/'




Theme © iAndrew 2016 - Forum software by © MyBB