Difference between revisions of "JFTP/syst"
From Joomla! Documentation
< API16:JFTP
(New page: ===Description===
Method to system string from the FTP server
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</n...) |
m (removing red link to edit, no existant pages) |
||
Line 3: | Line 3: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Syntax=== | ===Syntax=== | ||
Line 54: | Line 54: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Examples=== | ===Examples=== | ||
Line 69: | Line 69: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API16]] |
Revision as of 21:55, 13 May 2013
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Method to system string from the FTP server
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
syst()
Returns[edit]
string System identifier string
Defined in[edit]
libraries/joomla/client/ftp.php
Importing[edit]
jimport( 'joomla.client.ftp' );
Source Body[edit]
function syst() {
// If native FTP support is enabled lets use it...
if (FTP_NATIVE) {
if (($ret = @ftp_systype($this->_conn)) === false) {
JError::raiseWarning('35', 'JFTP::syst: Bad response');
return false;
}
} else {
// Send print working directory command and verify success
if (!$this->_putCmd('SYST', 215)) {
JError::raiseWarning('35', 'JFTP::syst: Bad response', 'Server response: '.$this->_response.' [Expected: 215]');
return false;
}
$ret = $this->_response;
}
// Match the system string to an OS
if (strpos(strtoupper($ret), 'MAC') !== false) {
$ret = 'MAC';
} elseif (strpos(strtoupper($ret), 'WIN') !== false) {
$ret = 'WIN';
} else {
$ret = 'UNIX';
}
// Return the os type
return $ret;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
<CodeExamplesForm />