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 =
I'm using this on Apache. You need to include 'inc/globals.php' in your
script.
inc/globals.php
?
require_once('functions.php');
define('RELPATH', GetRelativePath());
?
inc/functions.php
function GetRelativePath() {
$RELPATH = str_replace(UpDirectory(__FILE__), '',
$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
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 the
When $var is 0?
?
$var = 0;
// Output: $var: $var not exists
if ( $var )
echo '$var: $var existsbr';
else
echo '$var: $var not existsbr';
// Output: isset(): var exists
if ( isset($var) )
echo 'isset(): $var existsbr';
else
echo 'isset(): $var not existsbr';
?
Larry E
5 matches
Mail list logo