FTP API Class constants

at 2009-12-28 in Announcements by friebe (0 comments)

The global constants FTP_ASCII and FTP_BINARY have been replaced inside the peer.ftp package by class constants in the FtpTransfer class. Although these resolve to the same integer values and no change to existing sourcecode is required, the class constants are the preferred and portable way.

<?php 
$conn->rootDir()->file('index.txt')->uploadFrom(
new FileInputStream(new File('index.txt')),
FtpTransfer::ASCII
// instead of: FTP_ASCII
);
?>



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES

Related

Find related articles by a search for «FTP».