Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suresh-kumara-gist/db19df8b127b062e2e1c5a24387d2115 to your computer and use it in GitHub Desktop.
Save suresh-kumara-gist/db19df8b127b062e2e1c5a24387d2115 to your computer and use it in GitHub Desktop.
php 3 directory level down
<?php
require_once customization_module_file_path();
/**
* @return string test.module file path
*/
function customization_module_file_path() {
// The directory of the file
$customizationsmodulepath = __DIR__;
/**
* Given a string containing the path of a file or directory, this function
* will return the parent directory's path that is levels up from the
* current directory.
*/
$customizationsmodulepath = dirname($customizationsmodulepath, 3);
$customizationsmodulefilepath = $customizationsmodulepath . "/test.module";
return $customizationsmodulefilepath;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment