Jump to content
Sign in to follow this  
syxzero

Pdf Upload From One Folder View It On Another Folder

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

Share this post


Link to post
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 } ?>
Edited by syxzero

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...