ID:               50191
 User updated by:  ppass at hotmail dot fr
 Reported By:      ppass at hotmail dot fr
 Status:           Bogus
 Bug Type:         URL related
 Operating System: Windows
 PHP Version:      5.2.11
 New Comment:

I don't believe this. 
The manual says:
<< Array of arguments passed to the script. When the script is run on
the command line, this gives C-style access to the command line
parameters. When called via the GET method, this will contain the query
string. >>

"When the script is run on the command line" means that COMMAND line is
not the only way. Anyway, it is possible to call from PHP.

Still, the problem is not solved.


Previous Comments:
------------------------------------------------------------------------

[2009-11-16 16:20:34] j...@php.net

This variable is meant for COMMAND line only. 

------------------------------------------------------------------------

[2009-11-16 16:06:35] ppass at hotmail dot fr

Description:
------------
I sometimes use URLs with several arguments. The value of some of
arguments are urlencoded, so a space will be translated to a + sign.

The problem is that $SERVER['argv'] seems to interpret this + sign by 
as a separator.


Reproduce code:
---------------
File: argv_behaviour.php
<?php

Echo "<br/>List of arguments: (".$_SERVER['argv'][0].")";

?>

Expected result:
----------------
When launching argv_behaviour.php?arg1=aa&arg2=b+c&arg3=dd

I expect to see

List of arguments: (arg1=aa&arg2=b+c&arg3=dd)

Actual result:
--------------
but I get 

List of arguments: (arg1=aa&arg2=b)

I get the wrong number of arguments and truncated value for some of
them.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50191&edit=1

Reply via email to