a function to check directory depth


Posted on 16th Feb 2014 07:03 pm by admin

I'm working on a php script to upload files in to a set directory.
the user can select to upload into the "upload" directory or any of its subdirectories.
at the moment the user is able to `trick` the script into uploading a file into a lower directory by typing in "upload/../../" as the upload directory

I want to know if there is any way to verify the destination directory to make sure it is higher then the set directory.
Or use php.ini to restrict the directory allowed to upload

thanks

No comments posted yet

Your Answer:

Login to answer
91 Like 34 Dislike
Previous forums Next forums
Other forums

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and

How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/

I've got the base down you can uplo

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

Best way to cross matching large datasets
Hi,

Im running a script where am I cross matching about 200 000 data sets with each other. Ea

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

Printing a webpage
I use this to print the webpage: o

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash