在何处查找管道信息? [英] Where to Find Pipe Information?

查看:75
本文介绍了在何处查找管道信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




在Linux平台上,我需要从

PHP脚本中调用已编译的C程序(到做一些特殊的身份验证),并保持从PHP脚本传递给编译的C程序秘密的信息,即

信息不应传递在命令行上。


我建议使用PHP管道操作函数(例如popen)。


我在哪里可以找到更多关于管道的信息,特别是:


a)如何使用C库调用来操作管道?


b)Linux API(在C下面)库)?


我需要足够的信息来编写已编译的C程序,通过管道与PHP脚本交换

信息,以及处理异常

条件。


我只是不确定在哪里看...我甚至不确定C库是否

记录了......以及哪个文件n是合适的。


谢谢。

Hi,

On a Linux platform, I have the need to call a compiled ''C'' program from a
PHP script (to do some special authentication), and to keep the information
passed from the PHP script to the compiled ''C'' program secret, i.e. the
information should not be passed on the command-line.

The PHP pipe manipulation functions (such as popen) were suggested to me.

Where can I find out more about pipes, specifically:

a)How to use the C library calls to manipulate pipes?

b)The Linux API (below the C library)?

I need enough information to write the compiled ''C'' program, to exchange
information with the PHP scripts via pipes, and to handle exception
conditions.

I''m just not sure where to look ... I''m not even sure if the C library is
documented ... and which documentation is appropriate.

Thanks.

推荐答案



David T. Ashley写道:

David T. Ashley wrote:




在Linux平台上,我需要调用一个已编译的来自一个

PHP脚本的''C''程序(做一些特殊的身份验证),并保存从PHP脚本传递到编译'C'的信息
''程序机密,即

信息不应该在命令行上传递。


建议使用PHP管道操作函数(如popen)对我来说。


我在哪里可以找到更多关于管道的信息,具体来说:


a)如何使用C库调用来操纵管道?


b)Linux API(在C库下面)?

我需要足够的信息来编写已编译的C程序,通过管道与PHP脚本交换

信息,并进行处理例外

条件。


我只是不确定在哪里看...我甚至不确定C库是否是

记录......以及哪些文件是合适的。


谢谢。
Hi,

On a Linux platform, I have the need to call a compiled ''C'' program from a
PHP script (to do some special authentication), and to keep the information
passed from the PHP script to the compiled ''C'' program secret, i.e. the
information should not be passed on the command-line.

The PHP pipe manipulation functions (such as popen) were suggested to me.

Where can I find out more about pipes, specifically:

a)How to use the C library calls to manipulate pipes?

b)The Linux API (below the C library)?

I need enough information to write the compiled ''C'' program, to exchange
information with the PHP scripts via pipes, and to handle exception
conditions.

I''m just not sure where to look ... I''m not even sure if the C library is
documented ... and which documentation is appropriate.

Thanks.



我不知道Linux资源,但你试过PHP.net吗?
http://www.php.net/manual/en/function.popen.php

I don''t know Linux resources but have you tried PHP.net?
http://www.php.net/manual/en/function.popen.php


David T. Ashley写道:
David T. Ashley wrote:




在Linux平台上,我需要从

PHP脚本中调用编译的C程序(进行一些特殊的身份验证),并保留信息

从PHP脚本传递到编译的C程序秘密,即

信息不应该在命令行上传递。


向我推荐了PHP管道操作功能(如popen)。


我在哪里可以找到更多关于管道的信息,具体来说:


a)如何使用C库调用来操作管道?


b)Linux API(在C库下面)?


我需要足够的信息来编写已编译的C程序,通过管道与PHP脚本交换

信息,并处理异常

条件。


我只是不确定在哪里看......我甚至不确定C库是否记录了b
。 ..以及哪些文件是合适的。


谢谢。
Hi,

On a Linux platform, I have the need to call a compiled ''C'' program from a
PHP script (to do some special authentication), and to keep the information
passed from the PHP script to the compiled ''C'' program secret, i.e. the
information should not be passed on the command-line.

The PHP pipe manipulation functions (such as popen) were suggested to me.

Where can I find out more about pipes, specifically:

a)How to use the C library calls to manipulate pipes?

b)The Linux API (below the C library)?

I need enough information to write the compiled ''C'' program, to exchange
information with the PHP scripts via pipes, and to handle exception
conditions.

I''m just not sure where to look ... I''m not even sure if the C library is
documented ... and which documentation is appropriate.

Thanks.



我想我不明白传球的问题它在命令

行。如果这是一个过程到过程的沟通,它就不会被看见

无论如何。


至于使用烟斗 - 如果你''从来没有使用过它们,你要去b $ b需要做相当多的阅读。 api'并不复杂,但

处理错误而不会挂起有时会很棘手。

-

=== ===============

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================

I guess I don''t understand the problem with passing it in the command
line. If it''s a process-to-process communication, it won''t be visible
anyway.

As for using pipes - if you''ve never used them before, you''re going to
need to do a fair amount of reading. The api''s aren''t complicated, but
handling errors without hanging can sometimes be tricky.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


David T. Ashley写道:
David T. Ashley wrote:




在Linux平台上,我需要从一个

PHP脚本中调用一个编译好的''C''程序(进行一些特殊的身份验证),并保持信息

从PHP脚本到已编译的''C''程序秘密,即

信息不应该在命令行上传递。


PHP管道操作我建议使用各种功能(如popen)。


我在哪里可以找到更多关于管道的信息,具体来说:


a)如何使用C库调用来操纵管道?
Hi,

On a Linux platform, I have the need to call a compiled ''C'' program from a
PHP script (to do some special authentication), and to keep the information
passed from the PHP script to the compiled ''C'' program secret, i.e. the
information should not be passed on the command-line.

The PHP pipe manipulation functions (such as popen) were suggested to me.

Where can I find out more about pipes, specifically:

a)How to use the C library calls to manipulate pipes?



Google" stdio.h"。要从stdin读取,你就可以这样做,就像从键盘读取
一样,使用gets()和getc()等函数。要用
写入stdout,你可以使用puts()或printf()。


如果你已经有了一个工作程序,你很可能只需要管道

将数据输入其中并将其取出。

Google "stdio.h". To read from stdin, you just do it as though you''re
reading from the keyboard, with functions like gets() and getc(). To
write to stdout, you use puts() or printf().

If you have a working program already, chances are you can just pipe
data into it and get stuff back out.


这篇关于在何处查找管道信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆