Use of undefined constant

1

Well I was having the same problem from this question, gave an answer to using define('ROOT_PATH', dirname(__FILE__)); , ( my problem without using this solution) but in mine it does not work. It throws the error:

  

Warning: Use of undefined constant DIRECTORY - assumed 'DIRECTORY' (this will throw an error in a future version of PHP) in C: \ wamp64 \ www \ php_pdo \ view \ sign- p>

index.php:

    <php   
    define('DIRETORIO', dirname(__DIR__));
    ...

sign-in.php:

<?php
    if($_POST){
        $usuario = filter_input(INPUT_POST, 'usuario', FILTER_SANITIZE_STRING);
        $senha = filter_input(INPUT_POST, 'senha', FILTER_SANITIZE_STRING);

        require_once DIRETORIO . '/controller/logincontroller.php'; // linha 27
        LoginController::logar($usuario, $senha);

    }

I tried to do what this response suggests, but it did not.

sign-in.php

<?php
    if($_POST){
        $usuario = filter_input(INPUT_POST, 'usuario', FILTER_SANITIZE_STRING);
        $senha = filter_input(INPUT_POST, 'senha', FILTER_SANITIZE_STRING);
        require_once '../index.php';
        require_once DIRETORIO . '/controller/logincontroller.php'; // linha 27
        LoginController::logar($usuario, $senha);

    }
    
asked by anonymous 23.07.2018 / 00:33

0 answers