Hi,
I've a php scirpt that calls in an external class. The external class, myClass, has several public and private functions.
There is one public function which derives a value that I want be able to bring it to the main php scirpt. Here is the code.
PHP Code:
....snip....
include 'myClass.class.php';
$createFile = new myClassFunction();
echo '<div id="preview" style="display:block"><p>Accessing your link. Please wait.</p>';
// still working on this part
flush();
// Main Program
if ($createFile->DownloadPDF(trim($_POST['userPDFurl'])))
{
//User link is good
echo $createFile->GetFileName(); //This is the file user should be able to download
echo ($createFile->GeneratePDF('$_POST[quality]')) ? '<p>Success!</p>' : '<p>Error generating PDF file!</p>';
}
else
{
// Could not reach user link
echo '<p>Error downloading PDF!</p>';
}
....snip....
If you notice in above code, I can echo the newly created file name and path 'echo $createFile->GetFileName();'
What I want to do is to put the value from the function to some variable and create a link. Something like this:
PHP Code:
echo'
Here is your file <a href="http://mysite.cc/"$createFile->GetFileName()></a>. Click here
It doesn't really work, and I link appears messed up.
Can I put $createFile->GetFileName() in to yet another variable and echo that?
Thank you,
Nitin