怎么样在WEB页面里启动一个服务?

xiaogz 2002-11-25 10:29:43
WEB服务已经启动,在JSP页面里有启动和停止sendmail服务的按钮,
它们分别与相关的PERL程序相关来启动和停止sendmail服务。
但是我只能在WEB页面停止服务,而不能启动服务?
但在linux命令行界面执行同样的PERL程序却都能启动和停止服务。
真搞不懂,为什么?
...全文
62 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaogz 2002-12-10
  • 打赏
  • 举报
回复
Win32::Service 模块 在哪里啊?
xiaogz 2002-12-10
  • 打赏
  • 举报
回复
楼上的兄弟,有好什么办法帮帮忙啊,
这个问题困扰我半个月,一直没有解决。
Win32::Service 模块在哪里?
DavidWang_2008 2002-12-10
  • 打赏
  • 举报
回复
在 Platform SDK中,有相关的例子
alfal 2002-12-09
  • 打赏
  • 举报
回复
执行权限受限
可以用一个办法:
你将要执行的命令写信一个文件里面,然后让系统定时(例如一分钟一次)执行这个文件里面的命令
k2222hk 2002-11-27
  • 打赏
  • 举报
回复
参见 Win32::Service 模块 .可以进行停止服务与启运服务。

StartService(hostName, serviceName)

Start the service serviceName on machine hostName.

StopService(hostName, serviceName)

Stop the service serviceName on the machine hostName.

GetStatus(hostName, serviceName, status)

Get the status of a service. The third argument must be a hash reference that will be populated with entries corresponding to the SERVICE_STATUS structure of the Win32 API. See the Win32 Platform SDK documentation for details of this structure.

PauseService(hostName, serviceName)

ResumeService(hostName, serviceName)

GetServices(hostName, hashref)

Enumerates both active and inactive Win32 services at the specified host. The hashref is populated with the descriptive service names as keys and the short names as the values.

2,202

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧