diff --git a/beam.php b/beam.php index 10c948d..13332bd 100644 --- a/beam.php +++ b/beam.php @@ -19,8 +19,6 @@ if (!empty($_POST["desired_filename"])) PATHINFO_EXTENSION)); } - echo($file_name); - $beaming_permitted = 0; } else if (!empty($_FILES["fileToUpload"]["name"])) diff --git a/lib.php b/lib.php index 2f8e364..00e408a 100644 --- a/lib.php +++ b/lib.php @@ -88,6 +88,25 @@ function url_to_filename($url) return $filename; } +function get_cwd($url) +{ + $url_array = (explode("/", $url)); + + if (end($url_array)) + { + $parts = count($url_array); + + $url = implode(array_splice($url_array, 1, $parts - 2)); + + return $url; + } + else + { + return $url; + } +} + + function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data = false) { @@ -100,6 +119,7 @@ function celebrate($dest_file, $item_type, $image_url, $image_alt, $meta_data =

Your 's over here

+