D Jones
D Jones

Reputation: 76

Absolute File paths with Stylesheets CSS

Can anyone please tell me why the below will not and output the absolute filepath

<link rel="stylesheet" type="text/css" href=" <?php 'http://' . $_SERVER['HTTP_HOST'] . '/styles/styles.css'; ?> " />

I'm trying to create a constant link

Upvotes: 0

Views: 26

Answers (1)

Lucky Chingi
Lucky Chingi

Reputation: 2258

you forgot to echo

<link rel="stylesheet" type="text/css" href=" <?php echo 'http://' . $_SERVER['HTTP_HOST'] . '/styles/styles.css'; ?> " />

Upvotes: 3

Related Questions