summaryrefslogtreecommitdiff
path: root/filenames.php
diff options
context:
space:
mode:
authorkamakshidasan2016-12-22 15:42:26 +0530
committerkamakshidasan2016-12-22 15:42:26 +0530
commita249d85c0e727d8251102e13aa179f64d5f8dbf7 (patch)
tree175c82701bf3d53ae8d2ba481fcc99f8ee961c40 /filenames.php
parentb2cd0d0cad32683971baf53efa2e50ff8d26f66b (diff)
downloadxcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.gz
xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.tar.bz2
xcos-on-web-a249d85c0e727d8251102e13aa179f64d5f8dbf7.zip
Rearrange folders
Diffstat (limited to 'filenames.php')
-rw-r--r--filenames.php27
1 files changed, 0 insertions, 27 deletions
diff --git a/filenames.php b/filenames.php
deleted file mode 100644
index 81ca89f..0000000
--- a/filenames.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- * @jiteshjha
- * filenames.php returns the names of all the files in a given folder
- */
-
-// Store the filenames
-$filenameArray = [];
-
-// Get the folder to be operated
-$url = $_POST['url'];
-
-// Reference: http://php.net/manual/en/function.opendir.php
-// Open the file directory and get the filehandle
-$handle = opendir(dirname(realpath(__FILE__)).$url);
-
-// For each file in the folder, push the filename to filenameArray
-while($file = readdir($handle)){
- if($file !== '.' && $file !== '..'){
- array_push($filenameArray, "$url$file");
- }
-}
-
-// Return the file name array in JSON format
-echo json_encode($filenameArray);
-?>