it works... except in my case and I'm still missing something...
this is what I'm trying to enclose in the var and write to file (here I've already made my attempt, this is what didn't work):
PHP Code:
$var = '
<?php
$ftpStream = ftp_connect(\'ftp.server.com\');
$loginResult = ftp_login($ftpStream, \'login@server.com\', \'password\');
if ($loginResult) {
$dir = \'project1\';
$files_array = ftp_nlist($ftpStream, $dir);
array_shift($files_array);
array_shift($files_array);
krsort($files_array);
$recentRev = current($files_array);
echo \'<a href=\'../../../_ProjectFiles/HTTPalt.php?ProjRev=$recentRev\'><span class=\'bodyTextLG\'>$recentRev</span></a>\';
ftp_quit($ftpStream);
?>
it freaks up about the
href=\'../../../_ProjectFiles/HTTPalt.php?ProjRev=$recentRev\'><span class=\'bodyTextLG\'>$recentRev</span></a>\'; line, something about not liking '.'
Bookmarks