Skip to content

Relative path with ../ not implemented #10

@IamSAB

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);

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