mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
14 lines
No EOL
260 B
PHP
14 lines
No EOL
260 B
PHP
<?php
|
|
|
|
class Import {
|
|
public static function file($file) {
|
|
$content = file_get_contents($file);
|
|
return $content;
|
|
}
|
|
|
|
public static function json($file) {
|
|
$contents = Import::file($file);
|
|
$json = json_decode($contents);
|
|
return $json;
|
|
}
|
|
} |