I was try to add CSS
file to my html
file using statistic function like this:
public static function addCSS($file){
$cssPath = $_SERVER['DOCUMENT_ROOT']. DIRECTORY_SEPARATOR. 'new'.
DIRECTORY_SEPARATOR. 'css/'.$file;
return file_exists($cssPath) ? "
<link rel=\"stylesheet\" href=\"$cssPath\" type=\"text/css\"
media=\"screen\" charset=\"utf-8\" />
" : "CSS File not found";
}
but it doesn't work as i expected. i want it to produce the CSSPath like "http:localhost/new/css/admin.css when I'm called using
General::addCSS('admin.css');
but all i got is address like this which make me fail to include: C:/xampp/htdocs
ew\css/admin.css. how can i fix this addressing?