|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
.php download
Hi there,
is there a way to allow .php files (from my own server) to get downloaded (Bypassing the parsing by the Webserver) thx 4 reading freedimension |
|
#2
|
|||
|
|||
|
RE: .php download
Possibly but as long as you go through port 80 and you have a web server running its going to get parsed. You could telnet or SSH and get ahold of it but now your talking illegal things.
|
|
#3
|
|||
|
|||
|
RE: .php download
No, you misunderstood my question.
I wanted to know: if it is possible to make one of my own .php files downloadable (via a seperate .php script pushing the right buttons) and leaving the .php -appendix untouched. This is for an online administration tool. |
|
#4
|
|||
|
|||
|
RE: .php download
Ohh haha Yeah it is I`m sure of it let me write the code real fast and test it. This could take a little while because I`m working on my forum.. If anyone else has the code before me post it.
|
|
#5
|
||||
|
||||
|
RE: .php download
Write this code below, then your code (yourfile.php) will be downloaded.
<?php $fp = fopen("yourfile.php", "r"); $content = fread($fp, filesize("yourfile.php")); Header ('Content-type: application/octetstream'); Header ('Content-Disposition: inline; filename=yourfile.php'); ?> |
|
#6
|
|||
|
|||
|
RE: .php download
Cool,
thanx a lot |
|
#7
|
|||
|
|||
|
RE: .php download
i really hate to do this.. please don't hate me.. but.. TEST
|
|
#8
|
|||
|
|||
|
RE: RE: .php download
Quote:
With one minor change it did work. insert this line of code (after the 2 Header-functions): echo $content; |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > .php download |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|