在Raspberry pi上使用lighttpd的PHP shell_exec(PHP shell_exec with lighttpd on Raspberry pi)
我在raspberry pi上创建简单的Wi-Fi扫描脚本。 因为我使用了lighttp web服务器和php。 我可以运行PHP没有任何问题。 但是当我使用php运行shell脚本时,它没有正确返回结果。 我的代码是这样的
<?php $ssidoutput = shell_exec('. /var/www/html/scanssid.sh'); sleep(3); echo "<pre>$ssidoutput </pre>"; #var_dump($ssidoutput ); ?>
但是当我执行这个时,我只在我的网络浏览器上打印一个SSID。 但是当我运行shell脚本时,我可以在终端上看到完整的SSID列表。 我认为这是某种执行时间问题并添加睡眠值。 但这不会解决我的问题。 如何解决这个问题。 我的shell脚本只包含扫描Raspbian的SSID的命令
I'm creating simple Wi-Fi scanning script on raspberry pi. for that I used lighttp web server and php. I can run php without any issues. but when I run shell script using php it not properly return the results. my code is like this
<?php $ssidoutput = shell_exec('. /var/www/html/scanssid.sh'); sleep(3); echo "<pre>$ssidoutput </pre>"; #var_dump($ssidoutput ); ?>
but when I executing this I only get one SSID print on my web browser. but when I run shell script I can see full list of SSIDs on my terminal. I thought this is some kind of execution time issue and add sleep value. but that wont fix my issue. how to fix this. my shell script contain nothing but command to scan the SSIDs for Raspbian
原文:https://stackoverflow.com/questions/46306992
最满意答案
这可能是一个错误,但您现在可以使用此解决方法进行修复。 在你的页面中设置一些css:
.mat-tab-header{ direction:rtl; } .mat-tab-body-wrapper{ text-align:right }
This issue was a bug indeed. it was fixed and merged to Master branch on github today (15 minutes ago at the time of this post).
https://github.com/angular/material2/pull/12215
Next major release will have this bug out of the way. in the meanwhile you should use @moilkh's answer.
相关问答
更多-
Angular 4如何在角度材料选项卡组中禁用选项卡导航?(Angular 4 how do I disable tab navigation in an angular material tab group?)[2023-08-08]
我会通过使用以下css来做到这一点 ::ng-deep .mat-tab-label { pointer-events: none; } Plunker示例 I would do it by using the following css ::ng-deep .mat-tab-label { pointer-events: none; } Plunker Example -
Sitecore中的RTL内容条目(RTL content entry in Sitecore)[2022-01-16]
目前,Sitecore客户端不支持RTL。 如果您担心前端会有无效数据 - 请不要担心。 RTL只会更改文本流,不会影响内容编辑者输入内容的方式。 你可以在这里看到我的意思 - http://jsfiddle.net/dgtbw4m5/2/
< ... -
角度材料芯片rtl(Angular Material Chips rtl)[2023-11-27]
如果您想使用Angular Material的芯片组件获得RTL支持或类似的东西,您需要更改一些属性。 我确信这是一个更优雅的解决方案,但这个解决方案非常强大。 这是我添加的代码: SCSS 为清楚起见,我在SCSS中写了这个。 如果您使用的是常规css,则可以单击我添加的codepen演示中view compiled的view compiled md-chips.rtl { .md-chips md-chip { float: right; ._md-chip-r ... -
如何使用Jssor Slider Plugin创建rtl选项卡滑块(how to create rtl tab slider with Jssor Slider Plugin)[2024-02-08]
请将$ StartIndex设置为4(幻灯片的最后一个索引),并将$ AutoPlaySteps设置为-1。 var options = { ... $StartIndex: 4, //if you have 5 slides, the last index is 4 then $AutoPlaySteps: -1, ... }; Please set $StartIndex to 4 (the last index of your slides), and set $A ... -
这种情况正在发生,因为chosen下拉永远不会接近并且在启动时它会在滚动条结束的最左端。 CSS .chosen-container{ .position: fixed; z-index: 99; } 添加你的风格将解决这个问题。 我没有找到任何好的解决方案。 这是一些hacky方式,但我找到了这个工作。 工作Plunkr 谢谢。 This is happening because chosen dropdown never getting close & On start up it goes ...
-
这可能是一个错误,但您现在可以使用此解决方法进行修复。 在你的页面中设置一些css: .mat-tab-header{ direction:rtl; } .mat-tab-body-wrapper{ text-align:right } 工作演示 This issue was a bug indeed. it was fixed and merged to Master branch on github today (15 minutes ago at the time of this post). ht ...
-
你应该使用rtl作为属性 dir='rtl' 这是一个重要人物 转到index.html,你会发现:
Loading Material Docs example... You should use rtl as attribute dir='rtl' Here is a plunker Go to index.html , you'll find ... -
角度材料选项卡 - 在选项卡内容中按ng键单击手动导航(Angular Material Tabs - Manual navigation from ng-click inside tab content)[2023-05-14]
文档说明md-selected属性选择选项卡。那么您是否尝试将$ scope.selectedIndex设置为控制器中的整数以按索引号选择选项卡? 您需要在控制器上调用一个函数来执行此操作。 例如 Forgot Password 然后在你的控制器...... $scope.changeTab = function(index){ $scope.s ... -
Silverlight RTL支持(Silverlight RTL Support)[2023-11-19]
文本的RTL将由unicode文本本身自动进行。 因此,如果您将一些阿拉伯语文本放入TextBox,它将处于正确的方向(RTL),无论是否设置了FlowDirection。 FlowDirection仅用于镜像UI,而不是用于更改文本。 显然,还有一些巧妙的冒号特殊处理方法 。 所以基本上:是的,这是正确的,按预期工作。 The RTL-ness of the text will be automatically by the unicode text itself. So if you chuck in ... -
Angular2材料sidenav - 动态改变rtl / ltr方向(Angular2 material sidenav - changing rtl/ltr direction dynamically)[2022-02-11]
看一下源代码Dir指令 @Input('dir') _dir: LayoutDirection = 'ltr'; https://github.com/angular/material2/blob/2.0.0-alpha.9/src/lib/core/rtl/dir.ts#L19-L43 正如您所看到的那样,您正在更改_dir属性而不是dir setter: set dir(v: LayoutDirection) { let old = this._dir; this._dir = v; if ...