I'm a new to UNIX/LINUX. I just put cygwin on my laptop and I can navigate around the directories, but I can't open files (.doc, .ppt, .html or .exe). Is there an explicit command to do this? I know that in Solaris when it does not recognize the file, it brings up the list of available viewing... (4 Replies)
when i try to open a txt file in lynx I need to provide the filename or use wildcards to open. Autocompletion doesn't work for some reason.
Also, trying to open files like: .sh, .py etc. ends up in the following error:
lynx: Start file could not be found or is not text/html or text/plain ... (0 Replies)
Hi have set a command line argument where the user enters the filename.
I have set a condition that if the command line is null (user just enters return), the script will exit (with an error message).
However, what if the user types something and the file isn't found. How will I go about... (20 Replies)
I tried opening the files in a directory and print thier names.
But it was thowing the error "unable to open directorty at t5.pl line 2."
Can u plz correct this error in below mentioned code.
#!/data/scoredev/perl
opendir(HOMEDIR,"c:\vin") || die("unable to open directorty");... (3 Replies)
Im aware under IE, javascript uses ActiveX Objects to open up and manipulate text files, excel files etc..
How abouts would I open a text file using javascript in Firefox ?
thanks (1 Reply)
Hi All,
I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file.
Unfortunately, i encounter the below syntax error.
I think there should be something wrong with this term reports_${counting}_${_}.txt but i do... (4 Replies)
Good morning guys!!
Im still practicing with Perl and now Im trying to open a file, and copy its contents to another file. Them I want to remeove the information out of the orginal file after it is copied over.
The flow should be messages-->messages1-->messages2.
Kind of like a log... (1 Reply)
Hello,
I wrote a simple script, that basically wait for a *.dat-file in a certain folder, which is always a zipped file and extracts it.
It worked before and i changed nothing in the script, but since last week i have the problem, that it doesnt extract files containing a space. How do i make... (4 Replies)
Discussion started by: blend_in
4 Replies
LEARN ABOUT PHP
ftp_alloc
FTP_ALLOC(3) 1 FTP_ALLOC(3)ftp_alloc - Allocates space for a file to be uploadedSYNOPSIS
bool ftp_alloc (resource $ftp_stream, int $filesize, [string &$result])
DESCRIPTION
Sends an ALLO command to the remote FTP server to allocate space for a file to be uploaded.
Note
Many FTP servers do not support this command. These servers may return a failure code ( FALSE) indicating the command is not sup-
ported or a success code ( TRUE) to indicate that pre-allocation is not necessary and the client should continue as though the oper-
ation were successful. Because of this, it may be best to reserve this function for servers which explicitly require preallocation.
PARAMETERS
o $ftp_stream
- The link identifier of the FTP connection.
o $filesize
- The number of bytes to allocate.
o $result
- A textual representation of the servers response will be returned by reference in $result if a variable is provided.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
ftp_alloc(3) example
<?php
$file = "/home/user/myfile";
// connect to the server
$conn_id = ftp_connect('ftp.example.com');
$login_result = ftp_login($conn_id, 'anonymous', 'user@example.com');
if (ftp_alloc($conn_id, filesize($file), $result)) {
echo "Space successfully allocated on server. Sending $file.
";
ftp_put($conn_id, '/incomming/myfile', $file, FTP_BINARY);
} else {
echo "Unable to allocate space on server. Server said: $result
";
}
ftp_close($conn_id);
?>
SEE ALSO ftp_put(3), ftp_fput(3).
PHP Documentation Group FTP_ALLOC(3)