Ver Mensaje Individual
  #3 (permalink)  
Antiguo 05/11/2005, 02:19
Avatar de DvD AdN
DvD AdN
 
Fecha de Ingreso: mayo-2005
Ubicación: Frente al monitor
Mensajes: 610
Antigüedad: 18 años, 11 meses
Puntos: 0
Puedes usar la constante PHP_OS que contiene el S.O en el que corre PHP, el if-else se puede resumir a una linea así
Código PHP:
$separador = (stristr(PHP_OS'WIN')) ? '\\' '/'
que sería lo mismo que

Código PHP:
if (stristr(PHP_OS'WIN')) {//es Windows
$separador '\\';
}else{
//no es windows, 'tons es *nix
$separador '/';

...creo

__________________
Keep f***ing learning
Ask for f***ing help.
Use f***ing spell check.
Think about all the f***ing possibilities.