Path issue
Posted: Sun Jul 03, 2016 4:27 am
Hello everyone,
I ran into an issue and dont have an explanation for it.
Trying to get global command prompt access for composer using the terminal.
First I set the path in the environment and rebooted, (windows) and checked it ok.
Next I made a little hiworld.php file and for the test put it file in the same dir as php.exe.
Thinking I had global capabilities I entered php hiworld.php from C:\ and get Could not open input file.
changed into the same dir as the hiworld.php and php.exe and it worked.
went back to the C:\ typed 'd' ^z and it echoed back: 'd'
Then typed php C:\dir0\dir1\dir2\hiworld.php it worked
Then typed php C:\dir0\dir1\dir2 hiworld.php it did not work Could not open input file
Whats perplexing is that a dos batch file and php 'd' both echo back from C:\
but it wont execute the .php file from C:\ unless I include the whole path? I assume that is the problem I am running into with composer as well?
I thought all I'd have to do is type php hiworld.php from anywhere and it would have worked like a dos batch file? An explanation escapes me.
I ran into an issue and dont have an explanation for it.
Trying to get global command prompt access for composer using the terminal.
First I set the path in the environment and rebooted, (windows) and checked it ok.
Next I made a little hiworld.php file and for the test put it file in the same dir as php.exe.
Thinking I had global capabilities I entered php hiworld.php from C:\ and get Could not open input file.
changed into the same dir as the hiworld.php and php.exe and it worked.
went back to the C:\ typed 'd' ^z and it echoed back: 'd'
Then typed php C:\dir0\dir1\dir2\hiworld.php it worked
Then typed php C:\dir0\dir1\dir2 hiworld.php it did not work Could not open input file
Whats perplexing is that a dos batch file and php 'd' both echo back from C:\
but it wont execute the .php file from C:\ unless I include the whole path? I assume that is the problem I am running into with composer as well?
I thought all I'd have to do is type php hiworld.php from anywhere and it would have worked like a dos batch file? An explanation escapes me.