Parse Error - Im at a loss for what is causing this...

I am getting: Parse error: syntax error, unexpected ‘‘ftp.pointspreadpros.com’’ (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\dashboard\CallSpy\HTML\Spirit8 Free Website Template - Free-CSS.com\tf-free-no.3\php\test.php on line 4

I have tried single quotes and double quotes nothing works!..

<?php echo 'test'; $host = 'ftp.pointspreadpros.com'; $username = '133755'; $password = 'xxxxxxx'; // Create an FTP connection $conn = ftp_connect($ftp_server); // Login to FTP account using username and password $login = ftp_login($conn, $ftp_username, $ftp_password); // Get the contents of the current directory // Change the second parameter if wanting a subdirectories contents $files = ftp_nlist($conn, "."); // Loop through $files foreach ($files as $file) { // Do something with the file here. // For now we'll echo the filenames in a list echo $file."
"; } ?>

Where is $ftp_server coming from?

Sorry, let me repost, the variable names had changed since I posted:

<?php echo 'test'; $ftp_server = 'ftp.pointspreadpros.com'; $ftp_username = '133755'; $ftp_password = 'xxxxxxx'; // Create an FTP connection $conn = ftp_connect($ftp_server); // Login to FTP account using username and password $login = ftp_login($conn, $ftp_username, $ftp_password); // Get the contents of the current directory // Change the second parameter if wanting a subdirectories contents $files = ftp_nlist($conn, "."); // Loop through $files foreach ($files as $file) { // Do something with the file here. // For now we'll echo the filenames in a list echo $file."
"; } ?>

I used my own FTP credentials and it works. What version of Php are you on?

Thanks Kevin… My version is PHP 5. Using Notepad++ as my editor… But tried regular notepad as well and getting the same frustrating response.

If you can pm me the actual credentials you are using I can test it exactly as your trying to use it.

Sponsor our Newsletter | Privacy Policy | Terms of Service