由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - quesiton about PHP! waiting online
相关主题
OK, 现在好像没问题了建个人主页的一个问题
请问一个PHP设置的问题关于 apache 的一个问题
error in connecting PHP with MySQLCan not start Apache 2 with 用户认证. :-(
新手问3个apache、php的问题关于php的问题
PHP: Mysql 得parse 问题Drupal错误一问
httpd, php under RH8.0MIT is using MySQL + PHP
问一个关于charset的问题What do I need to install Joomla?
PHP apache 配置问题php新手问个upload file简单问题(谢谢解答,有包子答谢)
相关话题的讨论汇总
话题: varone话题: php话题: get话题: vartwo话题: variable
进入BuildingWeb版参与讨论
1 (共1页)
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


Variable 1:
Variable 2:



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.

相关主题
httpd, php under RH8.0建个人主页的一个问题
问一个关于charset的问题关于 apache 的一个问题
PHP apache 配置问题Can not start Apache 2 with 用户认证. :-(
进入BuildingWeb版参与讨论
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

1 (共1页)
进入BuildingWeb版参与讨论
相关主题
php新手问个upload file简单问题(谢谢解答,有包子答谢)PHP: Mysql 得parse 问题
问问大家,哪里有开放CGI权限的免费主页提供httpd, php under RH8.0
[转载] 想要原码么?问一个关于charset的问题
PHP中 include问题PHP apache 配置问题
OK, 现在好像没问题了建个人主页的一个问题
请问一个PHP设置的问题关于 apache 的一个问题
error in connecting PHP with MySQLCan not start Apache 2 with 用户认证. :-(
新手问3个apache、php的问题关于php的问题
相关话题的讨论汇总
话题: varone话题: php话题: get话题: vartwo话题: variable