|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-06-15 03:03 UTC] jmichae35 at gmail dot com
Description:
------------
PHP Parse error: syntax error, unexpected 'RID' (T_STRING), expecting ',' or ';' in T:\w2\jtr\ftp7a.php on line 361
Test script:
---------------
$conn_id = ftp_connect($host,$port) or die("ERROR: ftp_connect() could not get FTP connection! \r\n");
Expected result:
----------------
a valid connection. I even tried lowercasing the domain (which should not be necessary). domains are to be case insensitive according to the RFC.
Actual result:
--------------
PHP Parse error: syntax error, unexpected 'RID' (T_STRING), expecting ',' or ';' in T:\w2\jtr\ftp7a.php on line 361
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
<?php $server="somewhere.com"; $port=21; $conn_id = ftp_connect($server,$port) or die("ERROR: ftp_connect() could not get FTP connection! \r\n");?> I was surprised you took out the time to nail me for not including <?php tags ?> instead of trying the script. it's easy to use. try your own FTP server. did you know the die statement is absolutely required now and I can't just compare $conn_id===false later for validity check?try dropping the die statement and see if it still works. <?php $server="somewhere.com"; $port=21; $conn_id = ftp_connect($server,$port) /*or die("ERROR: ftp_connect() could not get FTP connection! \r\n")*/;?> now you get the RID error.