fixed getting cgi bin path

This commit is contained in:
sose 2021-04-08 00:53:33 +00:00
parent 0ed560fb41
commit 917928af75
1 changed files with 2 additions and 9 deletions

View File

@ -1,18 +1,11 @@
#!/usr/bin/php #!/usr/bin/php
<?php <?php
$abs_path = "gemini://" . getenv("SERVER_NAME") . getenv("SCRIPT_NAME"); $READER_LINK = dirname(__PATH__) . "/reader";
$READER_LINK = dirname($abs_path) . "/reader";
# ^^^^^^^ uri path to an instance of reader.php # ^^^^^^^ uri path to an instance of reader.php
# the default is relative, and assumes you have one in the same directory as # the default is relative, and assumes you have one in the same directory as
# this script # this script
$abs_path = "gemini://"
. getenv("SERVER_NAME")
. getenv("SCRIPT_NAME");
$topics = array("WORLD", $topics = array("WORLD",
"BUSINESS", "BUSINESS",
"TECHNOLOGY", "TECHNOLOGY",
@ -156,4 +149,4 @@ while ($feed->read()) {
} }
} }
$feed->close(); $feed->close();