iam J2EE developer,and new tophp,in jsp , there are a functionality to store object (e.g, UserVO) on request scope,like
Code: Select all
request.setAttribute(,how can i do this in php????
Regards
Moderator: General Moderators
Code: Select all
request.setAttribute(,Code: Select all
session_start();
$_SESSION['Hi'] = 'Hi from page 1';Code: Select all
session_start();
echo $_SESSION['Hi']; // Hi from page 1;Code: Select all
$xyz = 'some data';
require 'another_script.php';Code: Select all
// another_script.php
echo $xyz;Code: Select all
$GLOBALS['xyz'] = 'some data';
require 'another_script.php';Code: Select all
// another_script.php
echo $GLOBALS['xyz'];