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 trialThalles Ramos
353 PointsError loading files
Hey guys, I'm having a little problem at the time of rendering the pages, mainly seemed the html somehow can not load the javascript files, css and images. What should I on this issue?
4 Answers
Thalles Ramos
353 Pointsi dont know.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ralph Waldo Emerson</title>
<meta name="description" content="Ralph Waldo Emerson">
<meta name="author" content="Treehouse">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/master.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="js/global.js"></script>
</head>
<body>
this is my file index.html i compared with the example of video and everything seems ok or not?
Gabriel E
8,916 PointsTry adding a private bool on your main html page, the one that loads the files. Define that bool later on down in a method that tells the code where and how to execute. I'm not sure, but this might work or at least help!
Thalles Ramos
353 Points<?php
require 'vendor/autoload.php';
date_default_timezone_set('America/Manaus');
$app = new \Slim\Slim();
$app->get('/', function() use($app){
$app->render('index.html');
});
$app->get('/contact', function() use($app){
$app->render('contact.html');
});
$app->run();
This is my file index.php
The file renders the HTML pages, but somehow he can not do this, there is something wrong in the code?
Gabriel E
8,916 PointsI Would say it looks alright to me. Are you sure it's not a problem with one of your other files or images?