1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
From: William Desportes <williamdes@wdes.fr>
Date: Fri, 11 Apr 2025 15:44:38 +0200
Subject: Fix the examples with the Debian path
Origin: vendor
Forwarded: not-needed
---
examples/yaml-dump.php | 3 ++-
examples/yaml-load.php | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/examples/yaml-dump.php b/examples/yaml-dump.php
index 9d2160a..5975ea1 100644
--- a/examples/yaml-dump.php
+++ b/examples/yaml-dump.php
@@ -9,7 +9,7 @@
# learn some basic YAML.
#
-include('../Spyc.php');
+require_once 'spyc/Spyc.php';
$array[] = 'Sequence item';
$array['The Key'] = 'Mapped value';
@@ -23,3 +23,4 @@ $array['Old Dog'] = "And if you want\n to preserve line breaks, \ngo ahead!";
$array['key:withcolon'] = "Should support this to";
$yaml = Spyc::YAMLDump($array,4,60);
+echo $yaml;
diff --git a/examples/yaml-load.php b/examples/yaml-load.php
index 9e457e1..e7f2e6d 100644
--- a/examples/yaml-load.php
+++ b/examples/yaml-load.php
@@ -7,9 +7,9 @@
# license: [MIT License, http://www.opensource.org/licenses/mit-license.php]
#
-include('../Spyc.php');
+require_once 'spyc/Spyc.php';
-$array = Spyc::YAMLLoad('../spyc.yaml');
+$array = Spyc::YAMLLoad('/usr/share/doc/php-spyc/spyc.yaml');
echo '<pre><a href="spyc.yaml">spyc.yaml</a> loaded into PHP:<br/>';
print_r($array);
|