Skip to content

Instantly share code, notes, and snippets.

@YurePereira
Created February 18, 2017 17:47
Show Gist options
  • Select an option

  • Save YurePereira/3931e5274e373d7a6192ab15bbdfbc43 to your computer and use it in GitHub Desktop.

Select an option

Save YurePereira/3931e5274e373d7a6192ab15bbdfbc43 to your computer and use it in GitHub Desktop.
Pegando o caminho absoluto a partir da raiz da pasta publica do servidor
<?php
//Pegando o caminho absoluto a partir da raiz da pasta publica do servidor
$path = $_SERVER['DOCUMENT_ROOT'] . '\project-name\components\\';
$file = $path . 'header.php';
include($file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment