×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Pascual Muñoz
Added: Mar 11, 2017 5:23 PM
Modified: Mar 11, 2017 6:27 PM
Views: 14
Tags: php tools
include tools dependiendo de que sistema operativo detecte que se está ejecutando.
  1. <?php
  2.  
  3. if (strstr(php_uname(), 'Windows'))
  4. {
  5.         echo "cargando: " . realpath($_SERVER["DOCUMENT_ROOT"]) . "\desarrollo\cantina\\t00lz.php";
  6.         //_includeReal
  7.         include realpath($_SERVER["DOCUMENT_ROOT"]) . "\desarrollo\cantina\\t00lz.php";
  8. } else
  9. {
  10.         //includeReal
  11.         echo "cargando: " . realpath($_SERVER["DOCUMENT_ROOT"]) . "/cantina/t00lz.php";
  12.         include realpath($_SERVER["DOCUMENT_ROOT"]) . "/desarrollo/cantina/t00lz.php";
  13. }
  14.