syxzero Posted December 8, 2011 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 Link to comment Share on other sites More sharing options...
justsomeguy Posted December 8, 2011 Share Posted December 8, 2011 There's an equal sign in there that doesn't belong. Link to comment Share on other sites More sharing options...
syxzero Posted December 8, 2011 Author Share Posted December 8, 2011 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 More sharing options...
justsomeguy Posted December 8, 2011 Share Posted December 8, 2011 Right. Link to comment Share on other sites More sharing options...
syxzero Posted December 8, 2011 Author 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 Link to comment Share on other sites More sharing options...
justsomeguy Posted December 8, 2011 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. Link to comment Share on other sites More sharing options...
syxzero Posted December 8, 2011 Author 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 Link to comment Share on other sites More sharing options...
syxzero Posted December 9, 2011 Author 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> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.