Class function echo to link
Posted: Sun Nov 21, 2010 8:08 pm
Hi,
I'm fairly a novice to php. So plz excuse my ignorance
. I've this test app, where I'm bringing some value by echoing public function of a class. I can do the echo part. Now, my question is, can I put this value in some new variable?
Also, can I in some way use it to make a click-able link?
From above, can I put '$createFile->GetFileName()' in some new variable? I've been trying to use it in href link, bu I'm getting some really
results.
Thanks.
Nitin
I'm fairly a novice to php. So plz excuse my ignorance
Also, can I in some way use it to make a click-able link?
Code: Select all
....snip....
include 'myClass.class.php';
$createFile = new myClassFunction();
echo '<div id="preview" style="display:block"><p>Please wait.</p>';
// still working on this part
flush();
// Main Program
if ($createFile->DownloadPDF(trim($_POST['userPDFurl'])))
{
echo "http://mystie.cc/",$createFile->GetFileName(),"<br />\n"; //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
{
echo '<p>Error downloading PDF!</p>';
....snip.... }
Thanks.
Nitin