Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function abs_pathlink($pop=0)
  2. {
  3. $serversoftware = $_SERVER['SERVER_SOFTWARE'];
  4. if (substr($serversoftware,0,6)=="Apache")
  5. {
  6. $ptemp = explode("/", GetFileDir($_SERVER['SCRIPT_FILENAME']));
  7. //array_shift($ptemp);
  8. array_pop($ptemp);
  9. while ($pop > 0)
  10. {
  11. array_pop($ptemp);
  12. $pop--;
  13. }
  14. return implode("/", $ptemp)."/";
  15. }
  16. else return $_SERVER['APPL_PHYSICAL_PATH'];
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement