forked from Adleraci/adlerka.top
		
	test inlining
This commit is contained in:
		@@ -9,6 +9,7 @@ function inlineLocalStylesFromHref($inputString) {
 | 
			
		||||
        $href = isset($match[1]) ? $match[1] : $match[2];
 | 
			
		||||
 | 
			
		||||
        $fname = $_SERVER['DOCUMENT_ROOT'] . '/' . $href;
 | 
			
		||||
        echo "from $fname";
 | 
			
		||||
        // Get the content of the local CSS file
 | 
			
		||||
        $cssContent = file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/' . $href);
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +25,7 @@ function inlineLocalStylesFromHref($inputString) {
 | 
			
		||||
            $base64Content = base64_encode($fileContent);
 | 
			
		||||
 | 
			
		||||
            // Create the inline data URI
 | 
			
		||||
            $dataUri = 'url("data:image/' . pathinfo($url, PATHINFO_EXTENSION) . ';base64,' . $base64Content . '")';
 | 
			
		||||
            $dataUri = 'url("data:application/octet-stream;base64,' . $base64Content . '")';
 | 
			
		||||
 | 
			
		||||
            return $dataUri;
 | 
			
		||||
        }, $cssContent);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user