Hello,
I'm new wiyh PHP and would like to ask,
what is the common way to check if
directory path e.g. in url and file requested
are in proper format?
E.g. if I would give my homepage URL
in format /usr/software/index.php
it would be ok in my case but e.g.
/usr//software/index.php
would of course be wrong.
I tried those parse_url() etc methods but
they eat at least everything (or my php-version)
and does not understand any errors.
Could regular expression resolve this?
I haven't use it much so, can anyone say
how to test and notice that /usr//software/index.php
is not in proper format?
Thanks,
I'm new wiyh PHP and would like to ask,
what is the common way to check if
directory path e.g. in url and file requested
are in proper format?
E.g. if I would give my homepage URL
in format /usr/software/index.php
it would be ok in my case but e.g.
/usr//software/index.php
would of course be wrong.
I tried those parse_url() etc methods but
they eat at least everything (or my php-version)
and does not understand any errors.
Could regular expression resolve this?
I haven't use it much so, can anyone say
how to test and notice that /usr//software/index.php
is not in proper format?
Thanks,
Comment