Re: Can I pass the ftp transfer mode in a string?

From: Date: Wed, 02 Oct 2002 10:05:40 +0000
Subject: Re: Can I pass the ftp transfer mode in a string?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-118569@lists.php.net to get a copy of this message
In article <20021001032309.45254.qmail@pb1.pair.com>, johnkelly@hotmail.com says... > Thanks guys, I was unaware having quotes around it would make a difference. > Works fine once I removed the quotes. > > "John Kelly" <> wrote in message > news:20021001023646.11527.qmail@pb1.pair.com... > > Can I pass the ftp transfer mode in a string like ... > > > > $filetype = "FTP_ASCII"; > > $upload = ftp_fput($conid, $dfile, $sfile, $filetype); > > > > I ask as when I do I get the following error message ... > > > > Warning: ftp_fput() expects parameter 4 to be long, string given > > > > If I replace $filetype with the text FTP_ASCII or FTP_BINARY it works > fine. Quick explanation: FTP_ASCII is a symbolic constant, "FTP_ASCII" is a string. -- David Robley A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet?

« previous php.general (#118569) next »