我正在尝试将github设置为websever部署自动化。除了最重要的一点,我已经做好了一切工作。我有一个文件@ mydomain.com/github.php看起来像这样:'git pull'在SSH中执行,但不在github中后接收脚本
<?php
`git pull`;
?>
,这是 - 接收帖子的网址为我的github回购。 Github成功发布,但shell命令没有运行。当我尝试ssh方式连接到我的服务器,并直接运行该脚本:
php github.php
只是正常工作和更改的文件被成功地拉到
From git://github.com/user/Repo
7e3176d..f889c14 master -> origin/master
,但在我的浏览器或当github上的POST访问该页面时到它 - shell命令不执行。没有错误 - 只是一个空的结果。我在这里做错了什么?
我从来没有见过PHP语法前 – Vitamin 2012-02-19 20:05:20
http://php.net/manual/en/language.operators.execution.php我刚才了解到它有一天我自己:) – Yev 2012-02-19 20:06:05
试试<?php echo''git拉''?> – Kuba 2012-02-19 20:07:35