Hey guys,

I'm having a little trouble here - I have a php script that parses a .csv file and creates a bash script (.sh) along with a few other .txt files (not relevant). I then try to run the bash script at the end of the PHP script:

exec("sh $folderName.sh");

and it does nothing. After running the php script (which creates the bash script successfully), I've also tried running the bash script in terminal - again nothing.

Although, when I copy the contents of the bash script into a new file in XCode (I'm running OS X) and save it, overwriting the old file, then I can run the bash script in terminal and it works correctly. Doesn't make much sense to me since the file is exactly the same, just overwritten outside of the php script...

Any ideas?

Thanks
macos SteveMack2015 is online now
Tag This Post