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 ?>

Local file access with JavaScript

Just an update of the HTML5 features is in http://www.html5rocks.com/en/tutorials/file/dndfiles/. This excellent article will explain in detail the local file access in JavaScript. Summary from the mentioned article: The specification provides several interfaces for accessing files from a ‘local’ filesystem: File – an individual file; provides readonly information such as name, file size, MIME type, … Read more