Eric @ EricBess WebHome

En lugar de sólo pensar, a sabiendas de que no tendría sentido

Chinese (Simplified) flagItalian flagKorean flagPortuguese flagEnglish flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flag
By N2H

PHP FixPath Función [ruta función de acabado]

FixPath Función: fijar los caminos sucios. PHP camino función de la clasificación.
Ejemplo:

? Ver código PHP
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
  <? Php 
  ; echo "nnn sucios caminos: n"; 
  = 'C://////////Windows//////System' ; //  C:/System $ Caminos [] = 'C :////////// ////// Windows System; / / C: / Sistema de 
  = 'C:HTMLjavascript..examplescolors.html' ; //  C:/HTML/examples/colors.html $ Caminos [] = 'C: HTMLjavascript .. examplescolors.html'; / / C: / HTML / ejemplos / colors.html 
  = '/root/./wwwroot/scripts/../././webpage' ; //  /root/wwwroot/webpage $ Caminos [] = '/ root /. / Wwwroot / scripts / .. /. /. / Página web' / / / root / wwwroot / página web 
  = 'wwwroot/webpage/../index.php?querystring' ; //  wwwroot/index.php?querystring $ Caminos [] = 'wwwroot / web / .. / index.php? QueryString'; / / wwwroot / index.php? QueryString 
  = 'http://www.php.net/manual/en/../../downloads' ; //  http://www.php.net/downloads $ Caminos [] = 'http://www.php.net/manual/en/../../downloads'; / / http://www.php.net/downloads 
  = 'http://www.php.net/downloads/test/test1/test2//./docs.php' ; //  http://www.php.net/docs.php $ Caminos [] = 'http://www.php.net/downloads/test/test1/test2//./docs.php'; / / http://www.php.net/docs.php 
  = '../downloads/../docs.php' ; //  ../docs.php $ Caminos [] = '.. / descargas / .. / docs.php'; / / .. / docs.php 
  = 'localhost//projetos/../_arquivos/../' ; //   "" $ Caminos [] = 'localhost / / Proyectos / .. / _arquivos /../'; / / "" 
  = 'C:/downloads/../../../' ; //  C:/ $ Caminos [] = 'C: / descargas /../../../'; / / C: / 
  = 'downloads/../../../' ; //  ../../ $ Caminos [] = 'descargas /../../../'; / / ../../ 

  $paths as $path ) foreach ($ caminos como $ PATH) 
  ( 
      . $path . "&quot;  =  &quot;" .  fixpath ( $path ) . "&quot;" ; echo "n". "$ PATH". "=" ". fixpath ($ PATH)". ""; 
  ) 
  ?> 
Nota: "/ /" uno más barras de lograr la regresión de la raíz.

Haga clic aquí para seguir leyendo

17 de julio, 2008 Publicado por Eric | Codificación | No hay comentarios

Función FindRelativePath [ruta de acceso para averiguar la relación entre la relativa]

Php function: Se han encontrado relación entre el la ruta de acceso.
Función de PHP: para encontrar el camino entre la relativa relación.

Ejemplo:

? Ver código PHP
 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
  <? Php 
  'http://www.php.net/manual/en/install.php' ; $ Path_a = 'http://www.php.net/manual/en/install.php'; 
  'http://www.php.net/downloads' ; $ Path_b = 'http://www.php.net/downloads'; 

  Path A:  " . $path_a ; echo "\ n Ruta A:". path_a $; 
  Path B:  " . $path_b ; echo "\ n Ruta B:". path_b $; 
  A to B:  " .  findRelativePath ( $path_a , $path_b ) ; //  ../../downloads/ echo "\ n A a B:". findRelativePath ($ path_a, $ path_b); / / .. / .. / descargas / 
  B to A:  " .  findRelativePath ( $path_b , $path_a ) ; //  ../manual/en/install.php echo "\ n A a B". findRelativePath ($ path_b, $ path_a); / / .. / manual / es / install.php 
  ?> 

Función:

Haga clic aquí para seguir leyendo

17 de julio, 2008 Publicado por Eric | Codificación | 2 comentarios