How to access a variable across two files

Use: global.php <?php if(!session_id()) session_start(); $filename = “test”; if(!isset($_SESSION[‘filename’])) { $_SESSION[‘filename’] = $filename; } ?> test.php <?php if(!session_id()) session_start(); //include(“global.php”); $_SESSION[‘filename’] = “new value”; ?> test1.php <?php if(!session_id()) session_start(); $filename = $_SESSION[‘filename’]; echo $filename; //output new value ?>

Why does GCC not warn for unreachable code?

gcc 4.4 will give you warning. In the later versions of gcc this feature (-Wunreachable-code) has been removed. See here: http://gcc.gnu.org/ml/gcc-help/2011-05/msg00360.html The -Wunreachable-code has been removed, because it was unstable: it relied on the optimizer, and so different versions of gcc would warn about different code. The compiler still accepts and ignores the command line … Read more