I've a .phar file, how can I open it and modify the content?
I'm not familiar to this type of file so please explain a step by step solution
I've tried to use a php $phar->extractto()
to extract the archive with no results.
Asked
Active
Viewed 1,620 times
-1

Jaap
- 81,064
- 34
- 182
- 193

user7031185
- 61
- 2
- 9
-
1Don't you have the original source that was used to build the phar at all? – Mark Baker Oct 27 '16 at 09:56
-
no I only have the .phar file – user7031185 Oct 27 '16 at 09:57
-
`$phar->extractto() to extract the archive with no results.` sounds odd, What actually happened when using this method – RiggsFolly Oct 27 '16 at 10:04
-
I got this message "Cannot create phar 'it.phar', file extension (or combination) not recognised or the directory does not exist" – user7031185 Oct 27 '16 at 10:16
1 Answers
-1
If you'd searched for the latter part of your question, "work with .phar file", you'd have found https://cweiske.de/tagebuch/php-phar-files.htm
It tells you that you can use PHP's own phar
command to extract and re-add files.

cweiske
- 30,033
- 14
- 133
- 194