Skip to content

Commit 4d73eba

Browse files
committed
added content api call
1 parent 077a76f commit 4d73eba

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

webroot/api/content/index.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
header('Content-type: text/plain');
4+
5+
require_once "../../../resources/autoload.php";
6+
7+
if (isset($_GET["line_wrap"])) {
8+
$CHAR_WRAP = $_GET["line_wrap"];
9+
} else {
10+
$CHAR_WRAP = 80;
11+
}
12+
13+
if (!isset($_GET["content_name"])) {
14+
die();
15+
}
16+
17+
echo $SQL->getPage($_GET["content_name"])["content"];

0 commit comments

Comments
 (0)