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

Did you know?Explore Trending and Topic pages for more stories like this.
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

how make 2 column in table with data tybe long row
hi every one

I want make in my table 2 column with data tybe long raw

how thi

pass form variables straight to email, no database required?
hello all,

im working on this form...

http://www.adobedayevents.com/project_request/pr

Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem. view plaincopy to

Where am I going wrong
Been trying to work this out for hours

I have two tables called 'Genres' and 'Films'. Genre

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Filtering for a phrase using pregmatch
Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_

Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,

Whats the relationship between the following components: Aris, Netweaver BP

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside 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