docs
authorgggeek <giunta.gaetano@gmail.com>
Tue, 10 Jan 2023 16:42:04 +0000 (16:42 +0000)
committergggeek <giunta.gaetano@gmail.com>
Tue, 10 Jan 2023 16:42:04 +0000 (16:42 +0000)
demo/client/_prepend.php
demo/readme.md [new file with mode: 0644]
demo/server/_prepend.php

index 61ef17d..269b0dd 100644 (file)
@@ -1,15 +1,13 @@
 <?php
-/**
- * Hackish code used to make the demos both viewable as source, runnable, and viewable as html
- */
 
+// Hackish code used to make the demos both viewable as source and runnable
 if (isset($_GET['showSource']) && $_GET['showSource']) {
     $file = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)[0]['file'];
     highlight_file($file);
     die();
 }
 
-// Use the custom class autoloader. These two lines not needed when the phpxmlrpc library is installed using Composer
+// Use the custom class autoloader. These two lines are not needed when the phpxmlrpc library is installed using Composer
 include_once __DIR__ . '/../../src/Autoloader.php';
 PhpXmlRpc\Autoloader::register();
 
diff --git a/demo/readme.md b/demo/readme.md
new file mode 100644 (file)
index 0000000..0254314
--- /dev/null
@@ -0,0 +1,17 @@
+# PHPXMLRPC demo files
+
+## Installation notes
+
+If you have downloaded these demos separately from the PHPXMLRPC library, and want to see them in action, i.e. actually
+test them by executing them, you should make sure that their class autoloading configuration is correct, by either:
+
+1. move the `demo` folder to the root folder of the phpxmlrpc library, i.e. next to `debugger`, `doc`, `lib`, `src`; or
+2. edit the files `client/_prepend.php` and `server/_prepend.php` and change the line `include_once __DIR__ . '/../../src/Autoloader.php';`
+   to make it point to the location of the phpxmlrpc `src` folder
+
+It goes without saying that the demo files require an installed PHPXMLRPC library to work.
+
+## Usage notes
+
+__NB__ These files are meant for _demo_ purposes. They should _not_ be dumped onto a production web server where they are
+directly accessible by the public at large. We take absolutely _no responsibility_ for any consequences if you do that.
index 98de7fb..cb5594b 100644 (file)
@@ -1,14 +1,12 @@
 <?php
-/**
- * Hackish code used to make the demos both viewable as source, runnable, and viewable as html
- */
 
+// Hackish code used to make the demos both viewable as source and runnable
 if (isset($_GET['showSource']) && $_GET['showSource']) {
     $file = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)[0]['file'];
     highlight_file($file);
     die();
 }
 
-// Use the custom class autoloader. These two lines not needed when the phpxmlrpc library is installed using Composer
+// Use the custom class autoloader. These two lines are not needed when the phpxmlrpc library is installed using Composer
 include_once __DIR__ . '/../../src/Autoloader.php';
 PhpXmlRpc\Autoloader::register();