[eluser]skunkio[/eluser]
Thank you for your answers first of all.
I think I'm not getting the point so I try to explain better what I have done.
My MAMP webroot is like
Quote:MAMP
htdocs
my_site_folder
site
application_front
config
controllers
...
.
public
images
css
javascript
upload
and inside my config file I have the configuration below
Code:
$config['base_url'] = $PROTOCOL.$_SERVER['HTTP_HOST']."/";
$config['front_base_url'] = $config['base_url'];
$config['file_upload_base_url'] = $config['front_base_url']."upload/";
$config['css_images_js_base_url'] = $config['base_url']."public/";
if($_SERVER['HTTP_HOST'] == "localhost:8888" )
{
$config['base_url'] .= "my_site_folder/";
$config['front_base_url'] = "http://".$_SERVER['HTTP_HOST']."my_site_folder/";
$config['server_absolute_path'] = "/my_site_folder/site";
$config['file_upload_absolute_path'] = "/my_site_folder/upload/";
$config['file_upload_base_url'] = $config['front_base_url']."upload/";
$config['css_images_js_base_url'] = $config['base_url']."site/public/";
}
else
{
my live server configuration is here
}
then within my view i have, within the head this line to recall my js file
Code:
<$cript type="text/javascript" src="<?php echo css_images_js_base_url();?>javascript/my_js.js"></$cript>
the source of the page is correct and like below
Quote:<$cript type="text/javascript" src="http://localhost:8888/my_site_folder/site/public/javascript/my_js.js"><$cript>
For the css and images the same approach is working.
Then I have tried to add the base_url() tag within the <header> and change the path of my js with a relative one but without the echo part. Same result, it's not working.
What is wrong with my configuration?
Thanks in advance for your support