|
|
|
|
|
|
|
![]() |
#1 |
a.k.a. Sparky
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
|
If you're trying to remove it from the database, you could do:
Code:
update tablename set path=replace(path,'../../','../'); If you are trying to remove it from some data, and you knew it was just the first three characters, Code:
$path = substr('../../file.extension',3); Code:
$path = preg_replace('/^..\//','','../../file.extension'); Another possibility is parse_url, but, I am not sure how it would react. If you knew that you wanted to pull the first 'section' at the first /, you could do something like Code:
$arr = (explode('/','../../file.extension')); array_shift($arr); $path = join($arr,'/');
__________________
SnapReplay.com a different way to share photos - iPhone & Android |
![]() |
![]() |
![]() |
|
|