Clean separation#2
Open
rocambille wants to merge 2 commits intoLucBlocker01:masterfrom
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
La commande
php -S localhost:8000sert la totalité de ton projet. Certaines parties servent au fonctionnement interne et ne devraient pas être accessibles par un client. Par exemple, l'URL http://localhost:8000/src/classes/Quiz.php est accessible, alors que ce n'est pas une page : c'est une classe utilisée dans le processus de génération de quiz, et elle n'a pas de sens appelée toute seule.Tu as mis en place un dossier
publicet un dossiersrc: les choses accessibles publiquement pour un client doivent aller dans le dossierpublicet les fichiers sources qui servent au fonctionnement de ton projet doivent aller dans le dossiersrc.Tu peux alors servir uniquement ton dossier
publicavec l'option-t:Et l'URL http://localhost:8000/src/classes/Quiz.php n'existe plus ;)
Aussi, évite les valeurs en dur comme
http://localhost:8000/src/quizCreator.php: tu peux utiliser une URL relative à la racine du nom de domaine/quizCreator.php. De cette façon, ton code reste valable qu'il tourne en local (sur localhost:8000 ou sur un autre port) ou qu'il tourne sur un verveur en ligne (lucblocker01.com par exemple)