Skip to content

Relative path with ../ not implemented #10

Description

@IamSAB

Consider the following project structure:

  • Model
    • Hello.php
  • ...
  • public
    • index.php

When I write

$axel->addModule(new Axel\Module\PSR4('../Model', '\\Model'));

in my index.php, autoload fails.
As public is the working directory, you can add Model as Library only with using an absolute path, as Axel does not support '../', it does only replace './' with '':

if ($baseDir[0] == '/' || $baseDir[1] == ':') $this->baseDir = $baseDir;
else $this->baseDir = getcwd() . DIRECTORY_SEPARATOR . str_replace(['./'], '', $baseDir);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions