L
L
Lavrov952018-02-16 16:00:48
Composer
Lavrov95, 2018-02-16 16:00:48

Why do I have such an error? Failed to load resource: the server responded with a status of 500 (Internal Server Error)?

api  |
     |
    src    |
           |
         LojaAgua  |
                   |
               entidades   |
                           |
                      Usuario.php

composer.json
index.php

composer.json
{
  "require": {
    "slim/slim": "^2.6",
    "doctrine/orm": "^2.5"
  },
  "require-dev": {
    "phpunit/phpunit": "^4.6"
  },
  "autoload": {
    "psr-4": {
      "LojaAgua\\": "src/LojaAgua"
    }
  }
}

index.php
<?php
$loader = require __DIR__ . '/vendor/autoload.php';

use LojaAgua\entidades\Usuario;

$u = new Usuario();
$u->login = "ivan filipe";

echo "Hello " . $u->login;
?>

Usuario.php
<?php
namespace LojaAgua\entidades;

class Usuario{
    public $login;
    public $password;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question