This is a discussion on odd problem calling object methods within the PHP Language forums, part of the PHP Programming Forums category; Hi. I was wondering whether anyone else could see anything wrong with this code: <input name="name" ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi.
I was wondering whether anyone else could see anything wrong with this code: <input name="name" type="text" id="name" value="<?php print @$_SESSION['elements']['name']->getValue();?>"> When my browser tries to display this page I get the page and form down to this line where I get this displayed <input name="name" type="text" id="name" value=" and the rendering stops. It worked yesterday, then I suddenly got this problem and I don't know why. It also works on another win2000 pc. Also, if I change the above code to direct variable access like below, it works fine : <input name="name" type="text" id="name" value="<?php print @$_SESSION['elements']['name']->value;?>"> Personally, I'm mystified. |
|
|||
|
Bill wrote:
[edited] > <?php print @$_SESSION['elements']['name']->getValue();?> > does not work, however > > <?php print @$_SESSION['elements']['name']->value;?> > works as expected > > Personally, I'm mystified. read http://www.php.net/manual/en/languag...ialization.php Do you have the class to which $_SESSION['elements']['name'] belongs declared in the script with those print statements? -- I have a spam filter working. To mail me include "urkxvq" (with or without the quotes) in the subject line, or your mail will be ruthlessly discarded. |
|
|||
|
"Pedro" <hexkid@hotpop.com> wrote in message news:bo9bbv$1b31on$1@ID-203069.news.uni-berlin.de... > Bill wrote: > [edited] > > <?php print @$_SESSION['elements']['name']->getValue();?> > > does not work, however > > > > <?php print @$_SESSION['elements']['name']->value;?> > > works as expected > > > > Personally, I'm mystified. > > read > http://www.php.net/manual/en/languag...ialization.php > > > Do you have the class to which $_SESSION['elements']['name'] belongs > declared in the script with those print statements? Absolutely. As I said: exactly the same script works fine on another win2000 machine, and if I edit out the method call and replace it with the value itself - print @$_SESSION['elements']['name']->getValue() to print @$_SESSION['elements']['name']->value it works fine. Change it back and bang, it crashes again. |
|
|||
|
Bill wrote:
[...] > it works fine. Change it back and bang, it crashes again. do you have anything in the logs? php.ini error_reporting = E_ALL log_errors = On error_log = /path/to/error.log -- I have a spam filter working. To mail me include "urkxvq" (with or without the quotes) in the subject line, or your mail will be ruthlessly discarded. |
|
|||
|
"Pedro" <hexkid@hotpop.com> wrote in message news:bo9fg6$1c84rp$1@ID-203069.news.uni-berlin.de... > Bill wrote: > [...] > > it works fine. Change it back and bang, it crashes again. > > do you have anything in the logs? > > php.ini > > error_reporting = E_ALL > log_errors = On > error_log = /path/to/error.log I set up php.ini as above, replicated the problem, and nothing was written. :( |