mirror of
https://github.com/erusev/parsedown.git
synced 2024-09-20 03:51:29 +02:00
Use isset so we don't trigger a warning. Also change to <?php
This commit is contained in:
parent
69fbd76544
commit
c1730c0d00
@ -1,15 +1,13 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?PHP
|
<?php
|
||||||
|
|
||||||
$dir = dirname(__FILE__);
|
$dir = dirname(__FILE__);
|
||||||
require("$dir/../Parsedown.php");
|
require("$dir/../Parsedown.php");
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
$file_mode = is_readable($argv[1]);
|
|
||||||
|
|
||||||
// From a file
|
// From a file
|
||||||
if ($file_mode) {
|
if (isset($argv[1]) && is_readable($argv[1])) {
|
||||||
$str = file_get_contents($argv[1]);
|
$str = file_get_contents($argv[1]);
|
||||||
// From STDIN
|
// From STDIN
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user