FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
PHPWord/samples/Sample_30_ReadHTML.php at develop · ynphp/PHPWord · GitHub
ynphp
PHPWord
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
PHPWord
/
samples
/
Sample_30_ReadHTML.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (12 loc) · 405 Bytes
Breadcrumbs
PHPWord
/
samples
/
Sample_30_ReadHTML.php
Copy path
File metadata and controls
15 lines (12 loc) · 405 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
include_once
'
Sample_Header.php
'
;
// Read contents
$
name
=
basename
(
__FILE__
,
'
.php
'
);
$
source
=
realpath
(
__DIR__
.
"
/resources/
{
$
name
}
.html
"
);
echo
date
(
'
H:i:s
'
),
"
Reading contents from `
{
$
source
}
`
"
,
EOL
;
$
phpWord
= \
PhpOffice
\
PhpWord
\IOFactory::
load
(
$
source
,
'
HTML
'
);
// Save file
echo
write
(
$
phpWord
,
basename
(
__FILE__
,
'
.php
'
),
$
writers
);
if
(!
CLI
) {
include_once
'
Sample_Footer.php
'
;
}
Back
|
FazBrowse Home
|
New Git URL