Jump to content

Pdf Upload From One Folder View It On Another Folder


syxzero

Recommended Posts

On the folder where i upload the pdf, the code to view it is this

<a href="<?php echo $dbUserData['UniqueDirectory']."cv.pdf" ;?>" target="_blank" style="background-color:red" >View Doc </a>
however i believe the code to view it on the other folder on the serve would be
<?php if (file_exists($dbCandidateInfo['UniqueDirectory'].= "../v_registration/user/cv.pdf")) { ?><a href"../v_registration/download.php?i=<?php echo $dbCandidateInfo['C_ID']; ?>" target="_blank"><h4>Download CV</h4></a><?php } ?>
but it is not working can someone help please
Link to comment
Share on other sites

do you mean this part

<?php if (file_exists($dbCandidateInfo['UniqueDirectory']. -------- = -------- "../v_registration/user/cv.pdf")) { ?><a href"../v_registration/download.php?i=<?php echo $dbCandidateInfo['C_ID']; ?>" target="_blank"><h4>Download CV</h4></a><?php } ?>
Link to comment
Share on other sites

thanks i have done that but it still aint showing the code basically say that if file exists of candidates pull it from here

<?php if (file_exists($dbCandidateInfo['UniqueDirectory']."v_registration/users/cv.pdf")) { ?><a href="v_registration/download.php?i=<?php echo $dbCandidateInfo['C_ID']; ?>" target="_blank"><h4>Download CV</h4></a><?php } ?>
the file exists because when i go to view it via the uploading folder where the users file that the pdf is placed in i get the below preview...
is there another way of pulling from the db if it keeps failing please
Link to comment
Share on other sites

If it says the file doesn't exist then the file doesn't exist. You'll need to verify that you're using the correct path, it doesn't sound like you are. Print the path you're trying to check.
Hi there i am not a code but i am learning.. i don't understand what you mean by print the path
Link to comment
Share on other sites

This code seems to resolve the issues i don't know why, but it works

<h4> <?php if (file_exists) $dbCandidateInfo ["CV"]; ?><a href="../../v_registration/<?php echo $dbCandidateInfo['UniqueDirectory']."cv.pdf" ;?>" target="_blank" style="background-color:red" >View Resume/ Download</a></h4><p>
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...