;;;;;;;;;;;;;;;;; ; Data Handling ; ;;;;;;;;;;;;;;;;; ; ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3; The separator used in PHP generated URLs to separate arguments. ; Default is "&". ;arg_separator.output = "&"; List of separator(s) used by PHP to parse input URLs into variables. ; Default is "&". ; NOTE: Every character in this directive is considered as separator! ;arg_separator.input = ";&"; This directive describes the order in which PHP registers GET, POST, Cookie, ; Environment and Built-in variables (G, P, C, E & S respectively, often ; referred to as EGPCS or GPC). Registration is done from left to right, newer ; values override older values. variables_order = "EGPCS"; Whether or not to register the EGPCS variables as global variables. You may ; want to turn this off if you don't want to clutter your scripts' global scope ; with user data. This makes most sense when coupled with track_vars - in which ; case you can access all of the GPC variables through the $HTTP_*_VARS[], ; variables. ; ; 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 = On; This directive tells PHP whether to declare the argv&argc variables (that ; would contain the GET information). If you don't use these variables, you ; should turn it off for increased performance. register_argc_argv = On; Maximum size of POST data that PHP will accept. post_max_size = 8M; This directive is deprecated. Use variables_order instead. gpc_order = "GPC"; Magic quotes ;; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = On; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc. magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \'). magic_quotes_sybase = Off; Automatically add files before or after any PHP document. auto_prepend_file = auto_append_file =; As of 4.0b4, PHP always outputs a character encoding by default in ; the Content-type: header. To disable sending of the charset, simply ; set it to be empty. ; ; PHP's built-in default is text/html default_mimetype = "text/html" ;default_charset = "gb2312"; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On好象说是这里吧? 请问哪里需要改动一下的?
<?php
Session_start();
Session_register("mycount");
$mycount++;
?>
<html>
<title>无标题文档</title>
<body>
<?php
echo "$mycount";
?></body>
</html>可是我就是显示不出来.请问这是为什么?
<?php
session_start();
//实在不行。可以在这里把PHPSESSID的COOKIE手工写进去。
$_SESSION["mycount"]++;
?>
<html>
<title>无标题文档</title>
<body>
<?php
echo $_SESSION["mycount"];
?></body>
</html>
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
;
; Note - track_vars is ALWAYS enabled as of PHP 4.0.3; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
;arg_separator.output = "&"; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"; This directive describes the order in which PHP registers GET, POST, Cookie,
; Environment and Built-in variables (G, P, C, E & S respectively, often
; referred to as EGPCS or GPC). Registration is done from left to right, newer
; values override older values.
variables_order = "EGPCS"; Whether or not to register the EGPCS variables as global variables. You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[],
; variables.
;
; 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 = On; This directive tells PHP whether to declare the argv&argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.
register_argc_argv = On; Maximum size of POST data that PHP will accept.
post_max_size = 8M; This directive is deprecated. Use variables_order instead.
gpc_order = "GPC"; Magic quotes
;; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off ; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "gb2312"; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On好象说是这里吧? 请问哪里需要改动一下的?
也可以设置register_global为on
mrshelly(Shelly) 给的代码我也试过了.不知道就是不能显示.很奇怪.
1
------------
刷新一次之后:
2
<?
session_start();
$_SESSION["bcount"]=3;
echo $_SESSION["bcount"];
?>看看有没有值显示先。
<?
session_start();
$_SESSION["bcount"]=3;
echo $_SESSION["bcount"];
?>
---------
输出
3
-----
这次不知道我这里怎么没有提示变量没有定义。
------------------
回复人: ttlingo(文弱书虫) ( ) 信誉:100 2005-04-22 17:59:00 得分: 0
代码如:
<?php
Session_start();
Session_register("mycount");
$mycount++;
?>
<html>
<title>无标题文档</title>
<body>
<?php
echo "$mycount";
?></body>
</html>可是我就是显示不出来.请问这是为什么?
====================
我这里测试了,输出如下:
1
------------刷新一次之后显示:
2我用的是phpMyadmin,傻瓜式
下了个集成的php home edition