Fix: check php argv string argument

This commit is contained in:
2019-04-25 21:46:57 +09:00
parent 4065ba3482
commit 50e6edd899
2 changed files with 7 additions and 3 deletions
Executable → Regular
+6 -3
View File
@@ -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
View File
@@ -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";