Link header: syntax question

Hello,


<?php header('Link: <'.getPath('css').'some/more/stuff'.$var.'style.css>;rel=stylesheet'); ?>

Doesn’t work… I tried with double quotes, no success. How would you do it?

:slight_smile:

On a related note: can you include .js files using header()?

the [fphp]header[/fphp] function is for sending HTTP headers, not for HTML headers :slight_smile:


<link rel="stylesheet" type="text/css" href="<?php echo getPath('css'); ?>some/more/stuff<?php echo $var; ?>style.css">

(or /> instead of > at the end if you want XHMTL)

You can replace HTML headers with HTTP headers for .css files. :slight_smile:

My only problem is with the syntax.

Wait, what? Are you sure about that? I’ve never heard about it, and google doesn’t show much useful info either.

I do know that you can use the header function to let a PHP file act as though it’s a CSS file, but that’s something else :slight_smile: