草庐IT

push_at_command

全部标签

php - 从 PHP exec() 函数读取 git push 的输出

我正在为我的框架的命令行工具编写部署命令。它使用git进行部署。我在一行中执行此操作:exec("gitpush{$remote}{$branch}:{$branch}",$shell_output,$status);我想在$shell_output中获得推送的输出,但它没有发生(输出只显示在终端上)。我想是因为git是一个外部程序,因此创建了一个新的输出流?我试过使用描述为here的输出缓冲区无济于事。我确定SO上有一些东西可以回答这个问题,但经过大量挖掘后还没有找到它..因此,我们将不胜感激:) 最佳答案 git将它的输出发送到

php - XML 解析错误 : XML or text declaration not at start of entity

我的rss.php中有这个错误XMLParsingError:XMLortextdeclarationnotatstartofentityLocation:http://blah.com/blah/blah/site/rss.phpLineNumber1,Column3:andthisisshownunderneaththeerrorxzfbcbcxv123Descriptionfortherssfeed----------------^显示在页面左侧和?xml行之间。在我的rss.php中有';?>';?>';$sql="SELECT*FROM$_NEWS_TABLELIMIT5";

php - DOMDocument->saveHTML() vs urlencode with commercial at symbol (@)

使用DOMDocument(),我正在替换$message中的链接并添加一些内容,例如[@MERGEID]。当我使用$dom_document->saveHTML()保存更改时,链接得到“某种”url编码。[@MERGEID]变为%5B@MERGEID%5D。稍后在我的代码中,我需要用ID替换[@MERGEID]。所以我搜索urlencode('[@MERGEID]')-然而,urlencode()将符号(@)处的商业广告更改为%40,而saveHTML()已将其保留。所以没有匹配-'%5B@MERGEID%5D'!='%5B%40MERGEID%5D'现在,我知道可以运行str_re

php - Queue:push() 在 Laravel 5 中被同步处理

我正在运行Laravel5,我正在尝试让命令排队。我通过运行开始:Queue::push(newMyCommand());为了创建命令,我做了:phpartisanmake:command--queuedMyCommandMyCommand包含一个sleep(20)和file_put_contents('test.txt','Iwork!')我正在运行的命令行:beanstalkd-l127.0.0.1-p11301&phpartisanqueue:listen&并且config/queue.php设置为:'default'=>env('QUEUE_DRIVER','beanstalk

php - 如何使用 array_push 进行 json_encode

我是iOS开发人员,我正在用PHP开发Web服务以获取JSON响应。我写的代码是:$result=mysqli_query($con,"SELECT*FROMwp_marketcatagories");$data=array();while($row=mysqli_fetch_array($result)){$data[]=array_push($data,array('id'=>$row['id']));}$json=json_encode($data);echo$json;这是我想要的结果:[{"id":"1"},{"id":"2"},{"id":"3"},{"id":"4"},{

php - 一般错误 : '"mysqldump"' is not recognized as an internal or external command

我用的是LaravelSpatieBackup,安装完成,首先运行这个$composerrequirespatie/laravel-backup$composerrequirespatie/laravel-backupUsingversion^5.6forspatie/laravel-backup./composer.jsonhasbeenupdatedLoadingcomposerrepositorieswithpackageinformationUpdatingdependencies(includingrequire-dev)Packageoperations:3installs

Git 之 commit(未push) 代码后,如何回退/回滚到之前的版本的方法

Intellijcommit代码后回退1.选中项目右击---git---ResetHEAD ToCimmit:里面填写HEAD~1  点击Reset即可撤销上次commit的内容;下面会详细介绍ResetType:Mixed ToCommit:HEAD~1具体是什么意思!! 简单介绍一下git常用命令(idea提交就不用介绍了吧,工作中经常用到,如果有需要可以在评论下面说,后续可以添加介绍奥(●'◡'●)):    gitadd //添加要提交的内容  暂存区    gitcommit-m"提交的描述:大家最好把此次提交的信息简单描述一下" 本地仓库    执行完commit后,想撤回comm

php - 拉维 PHP : multiple project run at the same time

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭8个月前。Improvethisquestion我想同时运行多个laravelframework项目。具体怎么做我不知道。我使用命令:phpartisanserv--port=8080,在端口8080上运行另一个项目。当我在cmd中使用此命令时,它显示错误:

php - PDO:PDO::MYSQL_ATTR_INIT_COMMAND 中的多个命令

我正在使用这个PDO连接:try{$db=newPDO("mysql:host=localhost;dbname=...","dbu...","pass",array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SETlc_time_names='de_DE'"));}catch(PDOException$e){die("Error!");}现在我想添加另一个初始化命令:array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SETlc_time_names='de_DE'",PDO::MYSQL_ATTR_INIT_COMMAND=>"SETNAM

php - Laravel PHP fatal error : Class 'Table' not found with migrate command

我正在使用Laravel,我正在尝试将一些表迁移到我的数据库(phpmyadmin)。之前给我带来了一些麻烦,所以我在数据库中删除了迁移表中的所有行,所以现在什么都没有了。所以我尝试运行“phpartisanmigrate”,但出现以下错误:PHPFatalerror:Class'Table'notfoundin/var/www/loja/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.phponline301{"error":{"type":"Symfony\Component\Debug\Ex