Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Images Outside the Webroot in a webpage?
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Images Outside the Webroot in a webpage?
Images Outside the Webroot in a webpage?
03-08-2007 3:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I want to store images (.jpg) in a folder above the webroot on a linux server.
I know it is possible to read a file from a folder outside the webroot using php and place it into a webpage using image tag.
Done anyone know how this is done and what the code might look like?
Any help would be marvelous!
Many thanks
godricbj
Message 1 of 3
(3,753 Views)
2 REPLIES 2
Re: Images Outside the Webroot in a webpage?
03-08-2007 11:23 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Do you have full control of the server ie can set permissions etc?
It all depends were its stored if its on the local hard disk and not any part of the web server then you have got to address it as a file ie c:\mypictures if its any were on the web server then it can be addressed as a URL.
If you can tell use were it is ie the directory then we can give you the code. Most people would use a mysql database or you could just use html to give the file a path name
It all depends were its stored if its on the local hard disk and not any part of the web server then you have got to address it as a file ie c:\mypictures if its any were on the web server then it can be addressed as a URL.
If you can tell use were it is ie the directory then we can give you the code. Most people would use a mysql database or you could just use html to give the file a path name
Message 2 of 3
(1,183 Views)
Re: Images Outside the Webroot in a webpage?
04-08-2007 2:24 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi
thx for your help... it goes like this.
I am using a php image gallery called Slooze.
This is on a linux server and the gallery .php files are parked in two places.
The "programme" files are above the webroot and the display templates for users and admin are in the webroot.
Because they are in the webroot and they are .php I can protect them with a php password system from the mysql.
Slooze makes direct html calls to the images using the image tag... so the images files have to be in the webroot.
Slooze would really like to create its own thumbs, but I don't want to give it write permission on a folder in the webroot and .htaccess is not a convinent way to protect the images.
So....
I want to make a folder above the webroot, with write permission and call the images from it using php placed below the webroot.
It's a linux server and I do have control of folders and permissions directly above the webroot.
In fact I have succeeded in making a link that opens an image from an html link!... but not to open the image in the same page.
Bit long, but its not that simple, to me anyway.
Any help would be brilliant.
thx
godricbj
thx for your help... it goes like this.
I am using a php image gallery called Slooze.
This is on a linux server and the gallery .php files are parked in two places.
The "programme" files are above the webroot and the display templates for users and admin are in the webroot.
Because they are in the webroot and they are .php I can protect them with a php password system from the mysql.
Slooze makes direct html calls to the images using the image tag... so the images files have to be in the webroot.
Slooze would really like to create its own thumbs, but I don't want to give it write permission on a folder in the webroot and .htaccess is not a convinent way to protect the images.
So....
I want to make a folder above the webroot, with write permission and call the images from it using php placed below the webroot.
It's a linux server and I do have control of folders and permissions directly above the webroot.
In fact I have succeeded in making a link that opens an image from an html link!... but not to open the image in the same page.
Bit long, but its not that simple, to me anyway.
Any help would be brilliant.
thx
godricbj
Message 3 of 3
(1,183 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Images Outside the Webroot in a webpage?