From fcc33197fdfe9745a82e4a47a1fffb9a420b4ae8 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 21 Sep 2019 23:38:48 +0100 Subject: [PATCH] JS load process example added --- processes/on-file-load.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/processes/on-file-load.php b/processes/on-file-load.php index 0b89e1d..8d823ec 100644 --- a/processes/on-file-load.php +++ b/processes/on-file-load.php @@ -3,8 +3,11 @@ if (!isset($_SESSION['loggedIn'])) { die('Sorry, not logged in.'); } // Purpose: This file is run when a file is loaded, has $fileLoc and $fileName strings available to it -// Langs: PHP only +// Langs: PHP (tho can output JS via PHP echo, see below) // Example: // $fh = fopen(dirname(__FILE__)."/../file-dir-access.log", 'a'); // fwrite($fh, "LOAD >>> ".date("D dS M Y h:i:sa").": ".$fileLoc."/".$fileName."\n"); // fclose($fh); + +// If JS is needed, echo within string below, eg echo "alert('loaded');"; +echo "";