\Asset::forge('shared', array('paths' => array('assets/'),
'url' => 'http://shared.mywebsite.com/'));
echo \Asset::instance('shared')->css(array('bootstrap.css', 'font-awesome.css'));
<link type="text/css" rel="stylesheet" href="http://shared.mywebsite.com/assets\css\bootstrap.css />i have backslash in url, so files are not loaded. This backslash is the variable 'DS' define in fuel/core/bootstrap.php :
<link type="text/css" rel="stylesheet" href="http://shared.mywebsite.com/assets\css\font-awesome.css />
define('DS', DIRECTORY_SEPARATOR);
<?php
class Asset_Instance extends Fuel\Core\Asset_Instance
{
// --------------------------------------------------------------------
/**
* Unify the path
*
* make sure the directory separator in the path is correct for the
* platform used, is terminated with a directory separator, and all
* relative path references are removed
*
* @access private
* @param string The path
* @param mixed Optional directory separator
* @param boolean Optional whether to add trailing directory separator
* @return string
*/
protected function _unify_path($path, $ds = null, $trailing = true)
{
//before
$ds === null and $ds = DS;
//after
$ds === null and $ds = '/';
return rtrim(str_replace(array('\\', '/'), $ds, $path), $ds).($trailing ? $ds : '');
}
}
There is no problem on Linux environment because the constant DIRECTORY_SEPARATOR is a slash /It looks like you're new here. If you want to get involved, click one of these buttons!