- 1

Program that output it's source

hello. how can I make a program that output it's source code ?

18th Nov 2018, 11:25 PM
Menekeu Patricia
Menekeu Patricia - avatar
3 odpowiedzi
+ 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
19th Nov 2018, 1:34 AM
BroFar
BroFar - avatar
+ 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
19th Nov 2018, 3:30 AM
Lord Krishna
Lord Krishna - avatar
+ 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
19th Nov 2018, 8:02 PM
To_be_unnamed(_?_^@%∞)
To_be_unnamed(_?_^@%∞) - avatar