如何从 php 咆哮
我正在尝试从 PHP 发送咆哮通知。接收计算机是 OSX,我能够接收本地通知以及从其他计算机执行的 ruby 脚本发出的通知。没有设置密码。
我使用 php-growl 类,我的代码如下所示:
<?php
require 'class.growl.php';
$ip_address = '10.0.0.210';
$growl = new Growl($ip_address, '');
// Register with the remote machine.
// You only need to do this once.
$growl -> register();
// Send your message
$growl -> notify('PHP Growl', 'Title', 'Here\'s the body text');
?>
我的脚本已在本地注册为growl ,但没有显示任何通知。我在日志文件中也找不到任何 PHP 错误。
关于如何在不使用密码的情况下发送/接收咆哮有什么建议吗?
I am trying to send growl notifications from PHP. The receiving computer is OSX and I am able to receive local notifications as well as notifications from ruby scripts executed from other computers. No password is set.
I use the php-growl class and my code looks like this:
<?php
require 'class.growl.php';
$ip_address = '10.0.0.210';
$growl = new Growl($ip_address, '');
// Register with the remote machine.
// You only need to do this once.
$growl -> register();
// Send your message
$growl -> notify('PHP Growl', 'Title', 'Here\'s the body text');
?>
My script was registered in growl locally, but no notification was displayed. I can't find any PHP errors in my log files either.
Any suggestions on how to send/receive growls without using a password?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题不在于使用空密码。在发送 Growl 通知之前,您首先需要注册您计划发送的通知。
The problem isn't using an empty password. Before you can send a Growl notification, you first need to register the notifications that you plan to send.