Axis 2401 - PHP3 GUIDE Informations techniques Page 36

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 85
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 35
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 36
error_reporting(0);
if($fd = fopen("/tmp/counter","w"))
{
$buf =
fwrite($fd,strval($current_counter
));
fclose($fd);
}
error_reporting(E_ALL);
$inc = 0;
}
}
else if($suffix == "sequence")
{
if($current_counter > $counter_max)
{
$counter = 1;
}
$dest .= "_" . strval($current_counter);
$inc++;
if($inc >= $buffer_count)
{
$current_counter++;
error_reporting(0);
if($fd = fopen("/tmp/counter","w"))
{
$buf =
fwrite($fd,strval($current_counter
));
fclose($fd);
}
error_reporting(E_ALL);
$inc = 0;
}
}
$dest .= ".jpg";
error_reporting(0);
if(is_file($source_file))
{ //If the source file is present
if(!ftp_put($session, $dest, $source_file,
FTP_BINARY))
{ //Upload the source file
$failures++;
error_log("Could not upload file
".$source_file." as ".$dest." on
".$ftp_server,0);
}
else
{ //If successful upload, remove the
//uploaded file indicating capture
//of a new image
$failures=0;
unlink($source_file);
}
}
else
{
error_reporting(E_ALL);
$failures++;
Vue de la page 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 84 85

Commentaires sur ces manuels

Pas de commentaire