Re: Passing objects from one page to another
On Sun, 12 Nov 2006 17:02:33 -0500, Jerry Stuckle <jstucklex@attglobal.net>
wrote:
>>>True, some are better than others. But can you name one http agent
>>>which doesn't understand relative URI's?
>
[snip the first part of my response]
>
>That isn't what I asked, Andy.
I'll summarise the rest of my post then and repeat the answer: PHP's
fopen_wrappers HTTP user agent doesn't properly (*) understand illegal relative
URIs in Location headers. Amongst others.
(*) whatever properly means here, but it's inconsistent with other well-known
HTTP user agents in this undefined area.
>And how many of those libraries actually apply to this problem.
That isn't what you asked, Jerry!
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Re: Passing objects from one page to another
Andy Hassall wrote:
> On Sun, 12 Nov 2006 17:02:33 -0500, Jerry Stuckle <jstucklex@attglobal.net>
> wrote:
>
>
>>>>True, some are better than others. But can you name one http agent
>>>>which doesn't understand relative URI's?
>>
> [snip the first part of my response]
>
>>That isn't what I asked, Andy.
>
>
> I'll summarise the rest of my post then and repeat the answer: PHP's
> fopen_wrappers HTTP user agent doesn't properly (*) understand illegal relative
> URIs in Location headers. Amongst others.
>
> (*) whatever properly means here, but it's inconsistent with other well-known
> HTTP user agents in this undefined area.
>
>
>>And how many of those libraries actually apply to this problem.
>
>
> That isn't what you asked, Jerry!
>
My question was how many clients have a real problem with it. You
mentioned some client libraries - which are not the same thing.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Passing objects from one page to another
class.A.php
----------------------------------------------
class A
{
var $name;
function A($name = ''){
$this->name = $name;
}
}
source.php
------------------------------
include("class.A.php");
$p = new A('arknoah');
header('Location:dest.php?data='.urlencode(seriali ze($p)));
dest.php
-------------------------------
include("class.A.php");
$q = unserialize(urldecode(stripslashes($_GET['data'])));
//get_magic_quotes_gpc() = 1
echo $q->name;exit;
"Marcel дµÀ£º
"
> I have a person class adn i want to derive an object of that class on one
> page and pass that object to a next page but that does not work for me and i
> do not understand why.
>
> Here is de code:
>
> class.person.php
> -----------------------------------
> class person {
>
> private $_name;
>
> public function setName($name) {
>
> $this->_name = $name;
>
> }
>
> public function getName() {
>
> return $this->_name;
>
> }
>
> }
> --------------------------------------------
>
>
>
> person1.php // here is the object created
> -------------------------------------------
> require_once("class.person.php");
>
> $p = new person();
>
> $p->setName("Jim");
>
> $safep = urlencode(serialize($p));
>
> header("Location:person2.php?data=".$safep);
>
> exit;
>
>
> person2.php // page where the object is transfered to
> ---------------------------------------------------
> require_once("class.person.php");
>
> $p = unserialize(urldecode($_GET['data']));
>
> echo $p->getName();