File "index.php"

Full path: /var/www/html/recibos res/ftp/index.php
File size: 888 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Back

<?php 


function ftp($recibo){

// FTP server details
$ftpHost   = 'www.utparral.edu.mx';
$ftpUsername = 'webmaster';
$ftpPassword = 'Webamaster2017';

// open an FTP connection
$connId = ftp_connect($ftpHost) or die("Couldn't connect to $ftpHost");

// login to FTP server
$ftpLogin = ftp_login($connId, $ftpUsername, $ftpPassword);

// local & server file path
$localFilePath  = '../recibos/recibos/'.$recibo;
$remoteFilePath = '/var/www/html/recibos/recibos/'.$recibo;

// try to upload file
if(ftp_put($connId, $remoteFilePath, $localFilePath, FTP_BINARY)){
    echo "Se subio el recibo de nómina de: - $localFilePath";
}else{
    echo "Error no se pueden subir los rcibos en este momento intente más tarde $localFilePath";
}

// close the connection
ftp_close($connId);
}




?>




<!--ftp://webmaster:Webamaster2017@www.utparral.edu.mx/-->

PHP File Manager