Permalink
Browse files

if no source is given, display documentation

  • Loading branch information...
1 parent 7b387ec commit 7e90a126dd04c146f01516bf145b1a94d2e8cb48 @benbalter benbalter committed Jan 5, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 index.php
View
@@ -3,6 +3,13 @@
# Include Instant API's function library.
require_once('class.csv-to-api.php');
+# No Source file is given, just show documentation
+if ( !isset( $_REQUEST['source'] ) ) {
+ echo "<PRE>";
+ require "readme.md";
+ die();
+}
+
# Create a new instance of the Instant API class.
$api = new CSV_To_API();

1 comment on commit 7e90a12

@waldoj
Contributor
waldoj commented on 7e90a12 Jan 6, 2013

Great idea!

Please sign in to comment.