调试栏没有显示在网站的底部:
这是我的base.html.twig
<!DOCTYPE html>
<html class="no-js" lang="fr">
<head><meta name="google-site-verification" content="8ftgUdHWfZa5ANhU7DJxSpGof4khdKGz5X0phHaWa64" />
<title>{% block title %}{% endblock %}</title><meta name="description" content="Location en ligne de vêtements et accessoires de luxe entre particuliers : robes, costumes, sacs, vestes - Assurance incluse - Authenticité 100% garantie."><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" /><link rel="shortcut icon" href="{{ asset('bundles/frontoffice/images/faviconii.png') }}"><link rel="apple-touch-icon" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-57x57.png') }}"><link rel="apple-touch-icon" sizes="72x72" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-72x72.png') }}"><link rel="apple-touch-icon" sizes="114x114" href="{{ asset('bundles/frontoffice/images/apple-touch-icon-114x114.png') }}">
{% block stylesheets %} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"><link rel="stylesheet" href="{{ asset('/css/generalstyle.css') }}" type="text/css" />
{% endblock %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
window.smartlook||(function(d) {
var o=smartlook=function(){ o.api.push(arguments)},h=d.getElementsByTagName('head')[0];
var c=d.createElement('script');o.api=new Array();c.async=true;c.type='text/javascript';
c.charset='utf-8';c.src='//rec.smartlook.com/recorder.js';h.appendChild(c);
})(document);
smartlook('init', 'fec4728dc14b7eb5ae97ba5745a6fcc5763e911c');
</script>
</head>
<body>
{{ render(controller("ADFrontBundle:Default:menu")) }}
{% block body %}{% endblock %}
{{ include("ADFrontBundle:Default:footer/pied.html.twig") }}
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1139325582796441');
fbq('track', "PageView");</script><noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1139325582796441&ev=PageView&noscript=1"
/></noscript><script type="text/javascript">
</script>
{% block javascript %}
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script><script type="text/javascript" src=" https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-hover-dropdown/2.2.1/bootstrap-hover-dropdown.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.1.8/imagesloaded.pkgd.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-smooth-scroll/1.4.10/jquery.smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-parallax/1.1.3/jquery-parallax-min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/owl-carousel/1.32/owl.carousel.min.js"></script>
{% endblock %}
{% javascripts '@ADFrontBundle/Resources/public/js/skrollr.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/wow.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/page-scroll.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.easypiechart.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.isotope.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/popup-gallery.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/text-effect.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.tools.min.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.revolution.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/counter.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.fitvids.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/jquery.geocomplete.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/chosen.jquery.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% javascripts '@ADFrontBundle/Resources/public/js/main.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
<script type="text/javascript">
$(document).ready(function() {
$('.chosen-select').chosen();
$('.chosen-select-deselect').chosen({ allow_single_deselect: true });
$("#geocomplete").geocomplete({
details: "form",
blur: true,
geocodeAfterResult: true
});}); </script>
{% for message in app.session.flashbag.get('facebookNotValid') %}
<div id="my-modal" style="display:block;" class="modal fade in">
<div class="modal-dialog" style="margin-top:20%;">
<div class="modal-content" style="width: 92%; margin: 0 auto;">
<div style="padding: 30px; border: none;" class="modal-header">
<span style="text-transform: uppercase;" class="text-center slider-subtitle5 black-text no-margin-bottom">Vérification adresse email</span>
</div>
<div class="modal-facebook modal-body" style="padding: 30px; height: 174px;">
<p class="paragraphe-facebook" >Afin de profiter de toutes les fonctionnalités de Dressingavenue.com, veuillez renseigner une adresse email valide</p>
<div class="email-facebook col-sm-12" style="display: block;">
<form method="POST" action="{{ path('valider_fb') }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" / >
<div class="col-sm-8 col-md-8 col-xs-8 no-padding"><input type="text" name="emailFb" placeholder="Votre E-mail ..." style="text-transform:lowercase;padding: 9px;" required="" pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,3}$"></div>
<div class="col-sm-4 col-md-4 col-xs-4 no-padding"><button type="submit" class="highlight-button btn btn-medium button no-margin bg-logo2 white-text no-border">Valider</button></div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="modal-backdrop fade in"></div>
{% endfor %}
<script>
$( document ).ready(function() {
var close=true;
$('.display-it').click(function(){
$('.panel-mobile-hide').slideToggle( "slow" ,function(){
if(close){
$('.display-it').removeClass( "fa-minus" );
$('.display-it').addClass( "fa-plus" );
close=false;
}else{
$('.display-it').removeClass( "fa-plus" );
$('.display-it').addClass( "fa-minus" );
close=true;
}
});
});
if($('#fos_user_registration_form_tel').length){
$('#fos_user_registration_form_tel').prop("type", "tel");
}
if($('.telephone-input').length){
$('.telephone-input').prop("type", "tel");
}
});
</script>
<script src='https://cdn.slaask.com/chat.js'></script>
<script>
_slaask.init('74cfba4484b889bb6949aec78237743f');
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-79582949-1', 'auto');
ga('send', 'pageview');
</script>
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<script>
smartlook('tag', 'email', '{{ app.user.email }}');
smartlook('tag', 'name', '{{ app.user.prenom|title }} {{ app.user.nom|title }} ');
</script>
{% endif %}
</body></html>
这是我的应用内核:
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new CoreSphere\ConsoleBundle\CoreSphereConsoleBundle();
}
这是我的app_dev.php
<?php
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Debug\Debug;
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
// for more information
//umask(0000);
// This check prevents access to debug front controllers that are deployed by accident to production servers.
// Feel free to remove this, extend it, or make something more sophisticated.
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '41.250.108.226','fe80::1', '::1']) || php_sapi_name() === 'cli-server')
) {
header('HTTP/1.0 403 Forbidden');
exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}
/**
* @var Composer\Autoload\ClassLoader $loader
*/
$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();
require_once __DIR__.'/../app/AppKernel.php';
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
答案 0 :(得分:1)
这个问题背后可能有多种可能的原因。
原因#1
默认情况下,在开发环境中启用了调试模式,如果要启用它,则必须将以下语句放在 web 文件夹中的app.php
中。
Debug::enable();
如果您使用的是自定义创建的环境,请在
Debug::enable();
的网络文件夹中添加<Env Name>.php
原因#2
如果您使用的是开发环境,请确保Debug::enable();
文件中已存在app_dev.php
。
更新#1
此外,请在从浏览器控制台
加载页面时检查是否出现任何JavaScript错误答案 1 :(得分:0)
您的观点需要</body>
。
所以只需放一个html结构,就可以了。
<html>
<head></head>
<body></body>
</html>
答案 2 :(得分:0)
您是否通过将app_dev.php
附加到网址来访问您的路线?如果是这样,请确保在此行中:
if (isset($_SERVER['HTTP_CLIENT_IP'])
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '41.250.108.226','fe80::1', '::1']) || php_sapi_name() === 'cli-server')
)
在数组$_SERVER['REMOTE_ADDR']
中,它包含您要用于访问服务器的主机的IP地址。我认为您已对其进行了编辑并添加了41.250.108.226
。
如果一切正常,那么您可以访问调试环境并通过调试URL进行路由。让我们假设您想通过localhost访问服务器,然后使用调试URL查看调试栏,您可以在浏览器中输入:
如果有效,请告诉我们。如果没有,那么您可能已经改变了环境中的某些内容。