- 1
Program that output it's source
hello. how can I make a program that output it's source code ?
3 ответов
+ 6
No code ~ can't explain something we can't see
You can not mark your own answer as best answer when there is no answer here ~
please either correct your question and add the code in reference or delete the thread ~ or a mod will do this for you
Lord Krishna please review
+ 5
The best mark & self answer seems to removed, is fine now. BroFarOps 🦃&🎃🍰
About your question Menekeu Patricia
I don't do php so can't answer how.
You can check the below resources/examples and understand or wait until you get an answer.
https://rosettacode.org/wiki/Quine#PHP
https://bobtwells.wordpress.com/2010/01/09/php-quine/
https://nolancaudill.com/how-to-build-a-quine-eb717bfb7f1f
+ 1
<code>
$dir = getcwd(void);
$fname = "your_src_name"
$f = $dir."/".$fname;
echo file_get_contents($f);
</code>
Answering own question is great:D. It enriches our mind :-P