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

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

True way to see if action was successful?
If this is a good way to see if action was successful to continue:

Code: function changeGa

Storing Values taken from a DB...
Using this code it will generate a short list from my database

<?php
mysql_connect

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

quotes changing
hi all

in my content

opening quotes " changes to “

close qu

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

The repetition structure: the while statement not working
New programming student, have assignment as follows:
A restaurant has 4 lunch combos for custom

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

Company Code for Vendors created through Business Partners
Hi, experts!

I'm trying to set up the integration between Business Partner (BP) and Vendo

present value of sequence?
Hi

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

Thanks

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