hello everyone,
i just started doing PHP and mySQL
i have a login system with shopping cart and all
am doing a control panel to upload new products and images for admin
i have no problem uploading images and the pages loaded correctly with images matched with product IDs and all as long as the upload image folder is under the public_html tree
for security reason i try to move the upload image folder out of the public_html and place it in the root dir, the uploading process is fine, however the page loaded w/o the pix (only pix holder, like a blank with small x space)
under public_html dir
my uploading code:
$upfile = "../catalog-images/".$userfile_name;
show product code:
if (@file_exists("../catalog-images/".$row["product_ID"].".jpg"))
---> OK
out of public_html dir
my uploading code:
$upfile = "$DOCUMENT_ROOT/../catalog-images/".$userfile_name;
show product code:
if (@file_exists("$DOCUMENT_ROOT/../catalog-images/".$row["product_ID"].".jpg"))
or
if (@file_exists("../../catalog-images/".$row["product_ID"].".jpg"))
then the pix can NOT be viewed????????????????????
can anyone give me some pointers for this problem?