syxzero 0 Posted December 8, 2011 Report Share Posted December 8, 2011 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 Quote Link to post Share on other sites
justsomeguy 1,135 Posted December 8, 2011 Report Share Posted December 8, 2011 There's an equal sign in there that doesn't belong. Quote Link to post Share on other sites
syxzero 0 Posted December 8, 2011 Author Report Share Posted December 8, 2011 (edited) 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 December 8, 2011 by syxzero Quote Link to post Share on other sites
justsomeguy 1,135 Posted December 8, 2011 Report Share Posted December 8, 2011 Right. Quote Link to post Share on other sites
syxzero 0 Posted December 8, 2011 Author Report Share Posted December 8, 2011 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...http://visualcandidates.com/v_registration/users/e805a11a4790e812efc75c2266064ccc/cv.pdf is there another way of pulling from the db if it keeps failing please Quote Link to post Share on other sites
justsomeguy 1,135 Posted December 8, 2011 Report Share Posted December 8, 2011 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. Quote Link to post Share on other sites
syxzero 0 Posted December 8, 2011 Author Report Share Posted December 8, 2011 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 Quote Link to post Share on other sites
syxzero 0 Posted December 9, 2011 Author Report Share Posted December 9, 2011 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> Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.