Re: parse_url not parsing hosts with www properly in php 5.1.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 23/02/2006, at 8:45 PM, Jochem Maas wrote:

Dan Rossi wrote:
Ok it looks like when i exploded the urls by a comma, one has space

exploding the urls??? - this list is not called 'php-psychics'
for a reason. i.e. don't assume we know that you happen to have a
string which contains 'urls' that you seem to explode on a comma before
going on to run parse_url() on each item in the ensuing array. ;-)

PHP slang == explode()


padding, i had to trim it first, the array was coming out like host=>__http path=>//www.thedomain.com :\

that 'array' is clear as mud.

next time maybe post some code and show (copy+paste) the actual output not
some handtyped approximation. And before doing even that I recommend
you always do some simple debugging with var_dump() to examine the
actual contents of the variables in the code that seems to be broken
(once you see what in a variable it is quite often obvious what is going
wrong).


The previous part was from the var_dump ,as explained the url needed trimming as it had a space before the http://.

anyway you got it fixed on your own steam - that's a good thing :-)

rgds,
Jochem

On 23/02/2006, at 1:05 PM, Chris wrote:
Dan Rossi wrote:

Ive just discovered a strange issue where parse_url is not splitting up the url properly. in the host key its returning like //www.php.net where the url is http://www.php.net. any ideas ?


If the behaviour changed between versions without it being documented or noted somewhere, post a bug report - http://bugs.php.net.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux