Axis 2401 - PHP3 GUIDE Información técnica Pagina 25

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 85
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 24
An Introduction to PHP3
Axis Communications AB provides NO 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 1.02 October 2002 25
$passive_mode="on";
shoot();
$res = ftp($host, $user, $pass, $time, $delay, $source, $destination,
$suffix, $countermax, $startcount, $port, $passive_mode);
if($res == 1)
{
log("upload script - Could not connect to host");
}
else if($res == 2)
{
log("upload script - Could not log on to host");
}
else if($res == 3)
{
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";
$reply="";
$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");
}
?>
Vista de pagina 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 84 85

Comentarios a estos manuales

Sin comentarios