note 111146 added to function.is-executable
| From: | DaveRandom | Date: | Sun, 20 Jan 2013 00:32:11 +0000 |
| Subject: | note 111146 added to function.is-executable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-193274@lists.php.net to get a copy of this message | ||
is_executable() cannot necessarily be relied upon to return sensible results on Windows. Unlike
*nix, it does not check permissions, it uses the Windows API call GetBinaryType(), which checks
specifically whether the file path is a binary executable file.
This means, crucially, that it will never return TRUE for batch files or other scripts that could
otherwise be executed directly when called through the shell.
PHP source code ref: http://lxr.php.net/xref/PHP_5_4/TSRM/tsrm_win32.c#213
GetBinaryType() documentation: http://msdn.microsoft.com/en-gb/library/windows/desktop/aa364819(v=vs.85).aspx
----
Server IP: 69.147.83.199
Probable Submitter: 82.2.143.76
----
Manual Page -- http://php.net/manual/en/function.is-executable.php
Edit -- https://master.php.net/note/edit/111146
Del: integrated -- https://master.php.net/note/delete/111146/integrated
Del: useless -- https://master.php.net/note/delete/111146/useless
Del: bad code -- https://master.php.net/note/delete/111146/bad+code
Del: spam -- https://master.php.net/note/delete/111146/spam
Del: non-english -- https://master.php.net/note/delete/111146/non-english
Del: in docs -- https://master.php.net/note/delete/111146/in+docs
Del: other reasons-- https://master.php.net/note/delete/111146
Reject -- https://master.php.net/note/reject/111146
Search -- https://master.php.net/manage/user-notes.php