#9211 [Opn->Csd]: URL and PHP Info/Options functions NEEDED
| From: | nlopess@php.net | Date: | Wed, 29 Jun 2005 10:16:49 +0000 |
| Subject: | #9211 [Opn->Csd]: URL and PHP Info/Options functions NEEDED | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81158@lists.php.net to get a copy of this message | ||
ID: 9211
Updated by: nlopess@php.net
Reported By: chris at returnzero dot com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: *
PHP Version: 4.0.3pl1
New Comment:
Added in PHP 5 as http_build_query().
Previous Comments:
------------------------------------------------------------------------
[2001-02-11 11:00:57] chris at returnzero dot com
parse_url() is a great function, but a counterpart to it would be even
better.
Can we have a create_url() or create_query_string() function which
would take an array of items and build it using the local value of
arg_separator ? A lot of users do NOT use arg_separator because many
programs are written with & as the separator (and there is little
documentation about it). Programmers should want to accomodate ALL
users though and support those which use ";" or "|" as the separator
when writing programs designed to display URLs to get from page to page
of their application.
$base = "/search.php";
$qs = array ("action" => "search", "word" => "php");
echo create_url($base, $qs);
If the arg_separator is set to ";" the above script would output:
/search.php?action=search;word=php
Also, ini_get("arg_separator") and get_cfg_var("arg_separator") don't
work if it was set in .htaccess. Could we perchance also have
get_master_cfg_value() and get_local_cfg_value()? Those would help
solve the problem above, though programmers would have to write their
own create_url() function to build urls with the arg_separator value.
All three of those should be supported by PHP natively IMHO.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=9211&edit=1