Doc #70353 [Opn->Nab]: predefined constant missing

From: Date: Tue, 25 Aug 2015 09:09:06 +0000
Subject: Doc #70353 [Opn->Nab]: predefined constant missing
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12652@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70353&edit=1 ID: 70353 Updated by: salathe@php.net Reported by: paulo dot castro48 at gmail dot com Summary: predefined constant missing -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem Operating System: WIN PHP Version: 5.6.13RC1 -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: It looks like you want DIRECTORY_SEPARATOR [1]. The value of this constant is \ (backslash) on Windows, and / (forward slash) elsewhere. [1] http://php.net/manual/en/dir.constants.php#constant.directory-separator Previous Comments: ------------------------------------------------------------------------ [2015-08-25 08:55:11] paulo dot castro48 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/reserved.constants --- There is no predefined slash that depends on OS this is a problem when working in both linux and windows you have to change the slashed everytime you switch servers. define('PHP_SLASH', ( preg_match( '/^WIN/', PHP_OS ) ) ? "\\" : "/" ); echo PHP_SLASH; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70353&edit=1

« previous php.doc.bugs (#12652) next »