h***u 发帖数: 214 | 1 Hi,
I just install apache1.3.26 and php4.2.3. when I using
phpinfo();
?>
everything works fine, it will show me the information.
but when I try the followings, it give me an error,pls help me
*************test.html*************
This page is for Power Calculation
|
M******t 发帖数: 309 | 2 in your testphp1.php, use result is $_GET['varone'] + $_GET['vartwo']
【在 h***u 的大作中提到】 : Hi, : I just install apache1.3.26 and php4.2.3. when I using : : phpinfo(); : ?> : everything works fine, it will show me the information. : but when I try the followings, it give me an error,pls help me : *************test.html************* : : This page is for Power Calculation
|
h***u 发帖数: 214 | 3 Thank you!
but it still not work, the message is:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in c:\apache\htdocs\testphp1.php on
line 8
my platform is win2000 + apache + php. when I first install php, I try install
php as a module of apache, but it failed. so I install as cgi
line 8
line 8
【在 M******t 的大作中提到】 : in your testphp1.php, use result is $_GET['varone'] + $_GET['vartwo']
|
M******t 发帖数: 309 | 4 $var = $_GET['varone'] + $_GET['vartwo'];
print("result is $var");
install
【在 h***u 的大作中提到】 : Thank you! : but it still not work, the message is: : Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting : T_STRING or T_VARIABLE or T_NUM_STRING in c:\apache\htdocs\testphp1.php on : line 8 : my platform is win2000 + apache + php. when I first install php, I try install : php as a module of apache, but it failed. so I install as cgi : : line 8 : line 8
|
h***u 发帖数: 214 | 5 Still not work, Thanks anyway.
always say undefine varone and vartwo , the new var is zero.
do you think it is configuration problem?
【在 M******t 的大作中提到】 : $var = $_GET['varone'] + $_GET['vartwo']; : print("result is $var"); : : install
|
r****y 发帖数: 26819 | 6 Mine works according to this.
【在 h***u 的大作中提到】 : Still not work, Thanks anyway. : always say undefine varone and vartwo , the new var is zero. : do you think it is configuration problem?
|
r****y 发帖数: 26819 | 7 What did you add in the httpd.conf?
【在 h***u 的大作中提到】 : Still not work, Thanks anyway. : always say undefine varone and vartwo , the new var is zero. : do you think it is configuration problem?
|
h***u 发帖数: 214 | 8 Thank you both to reply my messages!
I have slove this problem. the solution is:
In "php.ini" set "register_globals=on"
it take me a long time to figure out.
【在 r****y 的大作中提到】 : What did you add in the httpd.conf?
|
M******t 发帖数: 309 | 9 by default it is on bah...
【在 h***u 的大作中提到】 : Thank you both to reply my messages! : I have slove this problem. the solution is: : In "php.ini" set "register_globals=on" : it take me a long time to figure out.
|
r****y 发帖数: 26819 | 10 Strange. Mine is off but it works!
I think by default it is off.
【在 h***u 的大作中提到】 : Thank you both to reply my messages! : I have slove this problem. the solution is: : In "php.ini" set "register_globals=on" : it take me a long time to figure out.
|
|
|
r****y 发帖数: 26819 | 11 See this is segment of my php.ini:
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = Off
【在 M******t 的大作中提到】 : by default it is on bah...
|
h***u 发帖数: 214 | 12 My default is "off", but I did not have this kind problem when I install the
older version PHP.
lead
【在 r****y 的大作中提到】 : See this is segment of my php.ini: : ; You should do your best to write your scripts so that they do not require : ; register_globals to be on; Using form variables as globals can easily lead : ; to possible security problems, if the code is not very well thought of. : register_globals = Off
|
r****y 发帖数: 26819 | 13 My Apache 2.0.42, PHP is 4.3.0-Dev, System Win2kPro.
【在 h***u 的大作中提到】 : My default is "off", but I did not have this kind problem when I install the : older version PHP. : : lead
|
M******t 发帖数: 309 | 14 俺的也是off,不好意思阿//blush
【在 r****y 的大作中提到】 : See this is segment of my php.ini: : ; You should do your best to write your scripts so that they do not require : ; register_globals to be on; Using form variables as globals can easily lead : ; to possible security problems, if the code is not very well thought of. : register_globals = Off
|
s**********i 发帖数: 711 | 15
default is off in 4.2.0. it's on in earlier versions.
if off, can't use $varone, but can use $_GET[varone],
or $_REQUEST[varone]
【在 r****y 的大作中提到】 : Strange. Mine is off but it works! : I think by default it is off.
|
o*h 发帖数: 16 | 16 Add or Update below line in php.ini
error_reporting = E_ALL & ~E_NOTICE
【在 h***u 的大作中提到】 : Hi, : I just install apache1.3.26 and php4.2.3. when I using : : phpinfo(); : ?> : everything works fine, it will show me the information. : but when I try the followings, it give me an error,pls help me : *************test.html************* : : This page is for Power Calculation
|