Hi,
I will try to explain this the best I can.
I want to find out the easiest way to put uploaded files into the correct folder.
Currently the folder structure has 1 layer for e.g: -
Layer 1
Panasonic Pricelist
Panasonic Brochures
etc
This is for works Intranet & at the moment Panasonic Pricelist has it's own php page & I have written the following script as an include file to get the name of the page which is the same name as the folder I want the file to be uploaded to: -
<?php
$name = basename($_SERVER['SCRIPT_NAME'], '.php');
$foldername = "c:/xampp/htdocs/$name/";
?>
The $foldername variable is then put into the upload script.
I have done it this way to save me manually typing in the directory for each product as there are probably around thirty products.
However, our IT manager now wants a more refined file structure & change it to 2 layers for example: -
Layer 1
Panasonic
Layer 2
Panasonic Pricelist
I would like to know what is the easiest way to amend the upload directory without physically manually typing in each directory for each product as the way i'm doing it at the minute I am missing out the layer 1 folder.
I hope this makes sense & any advice would be appreciated.
Thanks.
Lee.