English 中文(简体)
PHP session don t work in wamp5
原标题:PHP session doesn t work in wamp5
  • 时间:2010-05-18 18:50:35
  •  标签:
  • php

I muck up with php meetings it not working iompulsoryeck for basic programmes in session

ses.php

ses1.php The above prog doesn t work. dont know prob wit prog or wamp server. I have turned ON register_globals in php.ini also i checked with session.save_path="c:/wamp/tmp" session.save_handler= files. pl suggest me to handle with session

预先感谢。

问题回答

Are you creating and closing the session? Does the correct file path exist and is it writeable? (You are using windows, right?)

我也建议从西经共体行政屏幕上检查营地组合,以确保会议信息正确。 如果你改变道路,就必须重新启用网络服务器。

例: http://php.net/manual/en/Function.session-start.php

<?php
// page1.php

session_start();

echo  Welcome to page #1 ;

$_SESSION[ favcolor ] =  green ;
$_SESSION[ animal ]   =  cat ;
$_SESSION[ time ]     = time();

// Works if session cookie was accepted
echo  <br /><a href="page2.php">page 2</a> ;

// Or maybe pass along the session id, if needed
echo  <br /><a href="page2.php?  . SID .  ">page 2</a> ;
?>

页: 1

<?php
// page2.php

session_start();

echo  Welcome to page #2<br /> ;

echo $_SESSION[ favcolor ]; // green
echo $_SESSION[ animal ];   // cat
echo date( Y m d H:i:s , $_SESSION[ time ]);

// You may want to use SID here, like we did in page1.php
echo  <br /><a href="page1.php">page 1</a> ;
?>




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签