Appendix A – Included Application
log("upload script - Could not put the file");
}
else if($res == 4)
{
log("upload script - something wrong with parameters");
}
else if($res == 5)
{
log("upload script - could not turn passive mode
on/off");
}
?>
The second example depicts how to use the mail-function, and is the script mentioned
as mail_syslog.php in the utask-example:
<?php
include "/usr/php/mail.lib";
include "/usr/php/log.lib";
$subject="Todays messages";
$from="root@camera.domain";
$reply="";
$to="cam-admin@host.domain";
$copy="";
$body="/var/log/messages";
$attach="";
$res = mail($subject, $from, $reply, $to, $copy, $body, $attach);
if($res == 1)
{
log("mail script - Could not send mail:no sender\n");
}
else if($res == 2)
{
log("mail script - Could not send mail:no recipient\n");
}
?>
Axis Communications AB does not provide support for application development of any kind. The
information here is provided "as is", and there is no guarantee that any of the examples shown
will work in your particular application.
Revision 0.91 June 2001
31
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers