Web inaccessible folder... how to access?
Posted 26 June 2006 - 11:44 PM
The problem is, I want that folder to be somewhere where it can only be uploaded to by my server.
Also, (this script regards images) I need to be able to include the uploaded images in a page.
I tried using relative paths.... eg
[code=auto:0]<img src="../../uploads/imagefilename.jpg" />[code=auto:0] but that doesnt work.
Any help? do I need to do an fopen on the file?
Posted 26 June 2006 - 11:46 PM
does the folder exist uploads?
are you using a database?
post the script and form ok
if the folder uploads exist and the imagefilename exist this
will work on windows.
the uploads folder has to be in the same directory
as the php script with the below example.
<img src="uploads/imagefilename.jpg" >
((EMAIL CODE THAT WORKS))
((PAYPAL INTEGRATION THAT WORKS))
Posted 27 June 2006 - 12:07 AM
The upload script works perfectly fine (after one slight modification), but I am not sure how to access the image.
I tried this:
echo "<div align='center'><img align='center' src='../../uploads/uploads/$image_path' /></div>";
where $image_path is the dynamically generated image path. The outputted code in the page is:
<img align='center' src='../../uploads/uploads/30.jpg' />
Which looks like it should work, however it does not. (that is the right directory by the way)
Posted 27 June 2006 - 12:47 AM
../.. goes above the www.site.com, but it is not displaying the picture
Posted 27 June 2006 - 12:58 AM
<?php $filename = $_GET['image']; $path = '../../uploads/'; // send the proper headers for the image with header(); readfile($path.$filename); ?>
Disclaimer: Free advice is usually worth what you paid for it. ( or at least when it's coming from me! )
Posted 27 June 2006 - 01:14 AM
[a href=\"http://www.jafsitedesign.com/collegeartstore\" target=\"_blank\"]http://www.jafsitedesign.com/collegeartstore[/a]
the uploads file is ../../uploads/uploads relative to collegeartstore
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users