Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Whats wrong with this?

HI,

What is wrong with this?

 <!-- Bootstrap core CSS -->
    <link href="<?php echo BASE_URI; ?>templates/css/bootstrap.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="<?php echo BASE_URI; ?>templates/css/custom.css" rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="<?php echo BASE_URI; ?>templates/js/bootstrap.js"></script>
    <script src="<?php echo BASE_URI; ?>templates/js/ckeditor/ckeditor.js"></script>

1 Answer

Does your "BASE_URI" end with a slash? I think you need to add one before the custom link values:

 <!-- Bootstrap core CSS -->
    <link href="<?php echo BASE_URI; ?>/templates/css/bootstrap.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="<?php echo BASE_URI; ?>/templates/css/custom.css" rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="<?php echo BASE_URI; ?>/templates/js/bootstrap.js"></script>
    <script src="<?php echo BASE_URI; ?>/templates/js/ckeditor/ckeditor.js"></script>

Isnt the slash here?

/templates

 <link href="<?php echo BASE_URI; ?>/templates/css/bootstrap.css" rel="stylesheet">

Oh right :D

Thats yours xD thank you but it still doesnt work.

Did you define the BASE_URI anywhere?

<?php
define ('BASE_URI',''.$_SERVER['DOCUMENT_ROOT'].'');
?>

I downoladed the code from the tutorial wheres it was allready inserted so everything should be fine but its not : p i mean, if i delete the php tag, it will work