Fix: check php argv string argument
This commit is contained in:
Executable → Regular
+6
-3
@@ -1,7 +1,10 @@
|
||||
#!/usr/bin/php
|
||||
|
||||
<?php
|
||||
include("test_ncloud.php");
|
||||
for ($i = 0; $i < $argc; $i++) {
|
||||
echo "[".$i."] : ".$argv[$i]."\n";
|
||||
}
|
||||
|
||||
# include("test_ncloud.php");
|
||||
|
||||
# php test_ncloud.php 삼화초 jisangs@daum.net 2019-04-22
|
||||
# php test_ncloud.php name email date
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
# Usage :
|
||||
# php test_ncloud.php name email date
|
||||
# php test_ncloud.php 삼화초 jisangs@daum.net "2019년 4월 25일"
|
||||
|
||||
if($argc == 1) {
|
||||
echo "no maestro name";
|
||||
|
||||
Reference in New Issue
Block a user