Skip to content

Instantly share code, notes, and snippets.

@syrm
Created March 9, 2018 15:54
Show Gist options
  • Save syrm/57ff6ad63faa392b507a04a758cdccdc to your computer and use it in GitHub Desktop.
Save syrm/57ff6ad63faa392b507a04a758cdccdc to your computer and use it in GitHub Desktop.
<?php
require_once realpath(
dirname($_SERVER['SCRIPT_FILENAME'])
. DIRECTORY_SEPARATOR
. str_repeat(
'..' . DIRECTORY_SEPARATOR,
substr_count(
preg_replace('#^./#', '', $_SERVER['SCRIPT_FILENAME']),
DIRECTORY_SEPARATOR
))) . '/vendor/autoload.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment