When $var is 0?
// Output: $var: $var not exists
if ( $var )
echo '$var: $var exists';
else
echo '$var: $var not exists';
// Output: isset(): var exists
if ( isset($var) )
echo 'isset(): $var exists';
else
echo 'isset(): $var not exists';
?>
Larry E . Ullman wrote:
if($
You can use
$sid = session_name().'='.session_id();
instead of SID or you can define o constant
define('SID', session_name().'='.session_id());
at the start of script ( after session_start() ).
Todd Cary wrote:
I am trying to understand sessions are done with php. My "learning
script" has th
$i = 2;
$var = "view_request_$i";
$value = $$var;
Tristan Pretty wrote:
Simply put, can I connect 2 variables, to make one...
I want to output:
$view_request_$i
making for example a string:
view_all_2
But I'm getting errors..?
Parse error: parse error in /home/risk/public_html/download/results3.
I'm using this on Apache. You need to include 'inc/globals.php' in your
script.
inc/globals.php
define('RELPATH', GetRelativePath());
?>
inc/functions.php
function GetRelativePath() {
$RELPATH = str_replace(UpDirectory(__FILE__), '',
dir_name($_SERVER['SCRIPT_NAME]));
$REL
I'm using this one:
function FetchIP() {
$client_ip = $_SERVER['HTTP_CLIENT_IP'];
$x_forwarded_for = $_SERVER['HTTP_X_FORWARDED_FOR'];
$remote_addr = $_SERVER['REMOTE_ADDR'];
if ( !empty ($client_ip) ) {
$ip_expl = explode('.',$client_ip
5 matches
Mail list logo