[ create a new paste ] login | about

Link: http://codepad.org/370Yp1M7    [ raw code | output | fork ]

PHP, pasted on Jun 26:
1
2
3
4
5
6
7
<?php
$file1 = "file://path/to/some/file.html";
$file2 = "anotherfile?q=1";

$newurl = substr_replace($file1, $file2, strrpos($file1, "/")+1);

echo $newurl;


Output:
1
file://path/to/some/anotherfile?q=1


Create a new paste based on this one


Comments: