Ok im trying to get this to upload to the photogal directory
But I dont want to use the directory that the script is in i want to use the photogal directory up a level
so here's the dir structure
maindir
-photogal
-scripts
----photogal
i want it to use the photogal directory thats in the maindir not the on in the scripts dir.
hope i explained that well enuff, thanks for your help.
But I dont want to use the directory that the script is in i want to use the photogal directory up a level
so here's the dir structure
maindir
-photogal
-scripts
----photogal
i want it to use the photogal directory thats in the maindir not the on in the scripts dir.
hope i explained that well enuff, thanks for your help.
Code:
<?php $target_path = "photogal/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?>
Comment