开发者

How to run php code in gedit using External Tools plugin?

开发者 https://www.devze.com 2023-02-17 08:31 出处:网络
I\'ve tried this code in External Tools with actual document as input. But it doesn\'t work. #!/bin/sh

I've tried this code in External Tools with actual document as input. But it doesn't work.

#!/bin/sh
/usr/bin/php -r

Syntax check works as expected

#!/bin/sh
/usr/bin/php -l
开发者_JS百科

Outputs either error message or "No syntax errors detected"


For the external tools, set the "Input" to "Current document" and the command is just php (no options):

php

The output in the bottom pane will be the output of your script. Just keep in mind that this is only going to work for local files.

Edit: screenshots...

How to run php code in gedit using External Tools plugin?

How to run php code in gedit using External Tools plugin?


You can also one of the many Gedit keywords.

$$GEDIT_CURRENT_DOCUMENT_PATH
$GEDIT_CURRENT_DOCUMENT_URI
0

精彩评论

暂无评论...
验证码 换一张
取 消