Browse Source

split files

master
Robin Thoni 10 years ago
parent
commit
990fca77d6
2 changed files with 20 additions and 19 deletions
  1. 0
    19
      index.php
  2. 20
    0
      utils.php

+ 0
- 19
index.php View File

1
 <?php
1
 <?php
2
-function starts_with($haystack, $needle)
3
-{
4
-  return ($needle === ""
5
-          || strrpos($haystack, $needle, -strlen($haystack)) !== false);
6
-}
7
-
8
-function ends_with($haystack, $needle)
9
-{
10
-  return ($needle === ""
11
-          || strpos($haystack, $needle, strlen($haystack) - strlen($needle))
12
-          !== false);
13
-}
14
-
15
-function error($code, $message)
16
-{
17
-  header("HTTP/ $code $message");
18
-  die(json_encode(array("code" => intval($code), "message" => $message)));
19
-}
20
-
21
 function status_confirm($id)
2
 function status_confirm($id)
22
 {
3
 {
23
 }
4
 }

+ 20
- 0
utils.php View File

1
+<?php
2
+function starts_with($haystack, $needle)
3
+{
4
+  return ($needle === ""
5
+          || strrpos($haystack, $needle, -strlen($haystack)) !== false);
6
+}
7
+
8
+function ends_with($haystack, $needle)
9
+{
10
+  return ($needle === ""
11
+          || strpos($haystack, $needle, strlen($haystack) - strlen($needle))
12
+          !== false);
13
+}
14
+
15
+function error($code, $message)
16
+{
17
+  header("HTTP/ $code $message");
18
+  die(json_encode(array("code" => intval($code), "message" => $message)));
19
+}
20
+$>

Loading…
Cancel
Save