デスクトップ上でwindowsで言えば、.batファイルみたいなものを実行したいです。
自分で調べたところ、test.commandみたいなシェルを作成すればよいありました。
参考にしたサイトは、こちらです。
http://www.dafuku.com/2014/11/mac-bat-file.html
test.commandとtest.phpを同じ階層に作成しました。
// test.command
php test.php
// test.php
<?php $directory_path = "hoge"; mkdir($directory_path, 0777);
そのあと、chmod u+x test.commandを行い、実行権限を与えてシェルを動かしました。
testnoMacBook-Air:~ test $ /Users/test/Desktop/test.command ; exit; Could not open input file: test.php logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.
といったエラーが出てphpを実行できません。
Could not open input file: test.phpとはどういうことなのかわからないのでお願いします。
【調べたこと】
test.commandでいらない余白があるために読み込めないと思い、調べましたがそのようなことはありませんでした。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/17 02:21