Поскольку я перебираю страницы, в некоторых случаях они не загружаются полностью, когда я пытаюсь получить к ним доступ из
localhost / myproject / web / app_dev.php / Path.
Image1 localhost / myproject / web / app_dev.php / Path
Но каждая страница загружается нормально, используя только localhost: port / PATH.
Image2 localhost: порт / PATH
Мой /app/config/config.yml`
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@CalendrierMedecinsBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: en
framework:
#esi: ~
#translator: { fallbacks: ['%locale%'] }
secret: '%secret%'
router:
resource: '%kernel.project_dir%/app/config/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
default_locale: '%locale%'
trusted_hosts: ~
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
fragments: ~
http_method_override: true
assets: ~
php_errors:
log: true
# Twig Configuration
twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
host: '%database_host%'
port: '%database_port%'
dbname: '%database_name%'
user: '%database_user%'
password: '%database_password%'
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite'
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
#path: '%database_path%'
orm:
auto_generate_proxy_classes: '%kernel.debug%'
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
# Swiftmailer Configuration
swiftmailer:
transport: '%mailer_transport%'
host: '%mailer_host%'
username: '%mailer_user%'
password: '%mailer_password%'
spool: { type: memory }
sensio_framework_extra:
router:
annotations: false
Мой /app/config/routing.yml
calendrier_medecins:
resource: "@CalendrierMedecinsBundle/Resources/config/routing.yml"
prefix: /
app:
resource: '@AppBundle/Controller/'
type: annotation
Мой /app/config/routing_dev.yml
_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
_errors:
resource: '@TwigBundle/Resources/config/routing/errors.xml'
prefix: /_error
_main:
resource: routing.yml
routing.yml в моем комплекте
calendrier_medecins_homepage:
path: /
defaults: { _controller: CalendrierMedecinsBundle:Patient:addPatient }
calendrier_medecins_ajoutp:
path: /ajoutPatient
defaults: { _controller: CalendrierMedecinsBundle:Patient:addPatient }
calendrier_medecins_affichep:
path: /affichePatient
defaults: { _controller: CalendrierMedecinsBundle:Patient:getAllPatient }
calendrier_medecins_recherchepatient:
path: /recherchePatient
defaults: { _controller: CalendrierMedecinsBundle:Patient:recherchepatient }
Composer. json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" },
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"platform": {
"php": "5.6"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.4-dev"
}
}}
recherechePatient . html .twig
<!DOCTYPE html>
<html lang="en">
<head>
<title>Table V01</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="{{ asset('/madderahmed/images/icons/favicon.ico') }}"/>
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/vendor/bootstrap/css/bootstrap.min.css') }}">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/fonts/font-awesome-4.7.0/css/font-awesome.min.css') }}">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/vendor/animate/animate.css') }}">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/vendor/select2/select2.min.css') }}">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/vendor/perfect-scrollbar/perfect-scrollbar.css') }}">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/css/util.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('/madderahmed/css/main.css') }}">
<!--===============================================================================================-->
<style>
input[type=text], select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
</style>
</head>
{% block body %}
<body>
<div class="limiter">
<div class="container-table100">
<div class="wrap-table100">
<div class="table100">
<form style="position: absolute; margin-top: -200px;" method="post" >
<div ><span ><i ></i></span>
</div>
<input placeholder="Nom" type="text" name="nom">
<div ><span ><i></i></span>
<input placeholder="Prenom" type="text" name="prenom">
</div>
<input class="btn btn-primary" type="submit" value="recherche">
</form>
<table>
<thead>
<tr class="table100-head">
<th class="column1">ID</th>
<th class="column2">Nom</th>
<th class="column3">Prénom</th>
<th class="column4">Date</th>
<th class="column5">Heure</th>
<th class="column6">Medecin</th>
</tr>
</thead>
<tbody>
{% for p in patient %}
<tr>
<td class="column1">{{ p.id }}</td>
<td class="column2">{{ p.nom }}</td>
<td class="column3">{{ p.prenom }} </td>
<td class="column4">{{ p.date|date("m/d/Y") }}</td>
<td class="column5">{{ p.heure }}</td>
<td class="column6">{{ p.medecin }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<!--===============================================================================================-->
<script src="{{ asset('/madderahmed/vendor/jquery/jquery-3.2.1.min.js') }}"></script>
<script src="{{ asset('/madderahmed/js/main.js') }}"></script>
</body>
{% endblock %}
</html>
Скриншот веб-папки