|
Posted by juglesh on 11/25/05 17:45
juglesh wrote:
> hello, here is my dir structure:
>
> /private
> mainaction.php
> img.jpg
>
> /public_html
> index.php
>
> in index.php, I include mainaction.php. In mainaction.php, i want to
> have
> <img src='<?php insertImageHere ?>' > and have img.jpg show in
> index.php. I need to do this for a .js file and a .css as well.
Ok, this turned out to be an Apache question. You need to use an Alias
to tell apache what dir to look in, despite what the browser is asking
for. And, <Directory> to allow the access. The following code goes in
apache's httpd.conf config file, in my case, under the line that says
<IfModule mod_alias.c>
Alias /test/ "c:/my documents/_websites/guava/private/test/"
<Directory "c:/my documents/_websites/guava/private/test">
Order allow,deny
Allow from all
</Directory>
That will make it so <img src='/test/image.jpg' > gets the image from
the private dir, not from a folder in the web root. Works for .js,
..css, whatever.
--
j
Navigation:
[Reply to this message]
|