stackunderflow
stackunderflow

Reputation: 1774

php command line doesn't send to the script proper prompted input from user

php command line doesn't send to the script proper prompted input from user. his is an example of the issue

is_dir("C:/"); return 1 but is_dir(fgets(STDIN)) return null after user input "C:/"

Upvotes: 0

Views: 57

Answers (1)

Lake
Lake

Reputation: 913

Try this

is_dir(trim(fgets(STDIN)))

I think the raw inputs must be c:/ + ENTER KEY

Upvotes: 1

Related Questions