Re: system() function call: Strange error on NetWare!
| From: | Derick Rethans | Date: | Thu, 30 Jan 2003 10:03:13 +0000 |
| Subject: | Re: system() function call: Strange error on NetWare! | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93800@lists.php.net to get a copy of this message | ||
On Thu, 30 Jan 2003, Ananth Kesari wrote:
> Hi,
>
> I am using the system function on NetWare. I find the following strange
> error:
>
> 1. If I use single quoted strings, then I don't have any problem with
> any combination of the slash.
> system('sys:\system\p.nlm'); // WORKS
> system('sys:\\system\\p.nlm'); // WORKS
> system('sys:\system\r.nlm'); // WORKS
> system('sys:\\system\\r.nlm'); // WORKS
>
> 2. If I use doble quoted string then it works in these cases:
> system("sys:\system\p.nlm"); // WORKS
> system("sys:\\system\\p.nlm"); // WORKS
> system("sys:\\system\\r.nlm"); // WORKS
>
> 3. If I use double quoted string and I use single slash and the nlm
> name starts with 'n' or 'r' or 't', then the system function call
> fails
> to load the nlm thought the nlm is present in the given location. That
> is the below does not work:
> system("sys:\system\r.nlm"); // WORKS
>
> This erros appears to be strange with only three letters not being
> allowed. Can anyone throw some light as to what is happening here? Could
> there be a mistake in the NetWare port?
If used in a " string, these characters have the following meaning:
\r = #13 (CR)
\n = #10 (LF)
\t = #9 (tab)
so that's the reason why it doesnt work.
Derick
--
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
PHP Magazine - PHP Magazine for Professionals http://php-mag.net/
-------------------------------------------------------------------------