Fix directory separator in Pico::getUrlFromPath()

This commit is contained in:
Daniel Rudolf 2019-04-30 16:55:47 +02:00
parent ad729a99c4
commit f3b5a92247
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -2260,6 +2260,8 @@ class Pico
*/
public function getUrlFromPath($absolutePath)
{
$absolutePath = str_replace('\\', '/', $absolutePath);
$basePath = '';
if (isset($_SERVER['SCRIPT_FILENAME']) && strrpos($_SERVER['SCRIPT_FILENAME'], '/')) {
$basePath = dirname($_SERVER['SCRIPT_FILENAME']);