Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

Konrad Pilch
Konrad Pilch
2,435 Points

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

Jeff Lemay
Jeff Lemay
14,266 Points

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>
Konrad Pilch
Konrad Pilch
2,435 Points

Isnt the slash here?

/templates

 <link href="<?php echo BASE_URI; ?>/templates/css/bootstrap.css" rel="stylesheet">
Konrad Pilch
Konrad Pilch
2,435 Points

Oh right :D

Thats yours xD thank you but it still doesnt work.

Jeff Lemay
Jeff Lemay
14,266 Points

Did you define the BASE_URI anywhere?

<?php
define ('BASE_URI',''.$_SERVER['DOCUMENT_ROOT'].'');
?>
Konrad Pilch
Konrad Pilch
2,435 Points

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