Ik ben bezig met een scriptje die de inhoud van een *.php en/of *.pl/cgi bestand kan laten zien. Ik wil nl. via een lokaal script op m'n eigen localhost de source kunnen zien van mijn php-scripts op de server.
Ik had tot nu toe dit:
Maar telkens als ik bij $file een http-adres invoer, zoals [url="http://localhost/tekst.txt"]http://localhost/tekst.txt[/url] geeft het script geen output weer.
Weet iemand hier raad mee??
BVD
Ik had tot nu toe dit:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
| <?php $file ="./tekst.txt"; $fp = fopen($file, "r"); $contents = fread ($fp, filesize ($file)); ?> <textarea cols=150 rows=50> <?php echo($contents); ?> </textarea> <?php fclose ($fp); ?> |
Maar telkens als ik bij $file een http-adres invoer, zoals [url="http://localhost/tekst.txt"]http://localhost/tekst.txt[/url] geeft het script geen output weer.
Weet iemand hier raad mee??
BVD