Skip to content

Commit 4a530d1

Browse files
authored
Do not show script source when running from CLI
1 parent 35aa6d6 commit 4a530d1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

samples/Sample_Header.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ function write($phpWord, $filename, $writers)
8484
}
8585

8686
$result .= getEndingNotes($writers);
87-
$result .= '<pre><code>';
88-
if (file_exists($filename . '.php')) {
89-
$result .= highlight_file($filename . '.php', true);
90-
}
91-
$result .= '</code></pre>';
9287

9388
return $result;
9489
}
@@ -127,6 +122,12 @@ function getEndingNotes($writers)
127122
}
128123
}
129124
$result .= '</p>';
125+
126+
$result .= '<pre>';
127+
if (file_exists($filename . '.php')) {
128+
$result .= highlight_file($filename . '.php', true);
129+
}
130+
$result .= '</pre>';
130131
}
131132
}
132133

0 commit comments

Comments
 (0)