RE: [PHP] Viewing source by using .phps command
| From: | Philip Olson | Date: | Fri, 10 Nov 2000 03:53:46 +0000 |
| Subject: | RE: [PHP] Viewing source by using .phps command | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24617@lists.php.net to get a copy of this message | ||
If you want a .phps visable then you can symlink it (assuming you're
running *nix of some sort) :
ln -s foo.php foo.phps
That way you could view .phps . If you want to make your source available
by other means then look into the show_source() function. Otherwise, save
it as .phps and it *should* be available. Why do I put *'s around should?
This is set in http.conf by server admin BUT it is the default setting so
often works. If not and you want it to then you can setup a .htaccess
file in the given directory and put this in it :
If php4 :
AddType application/x-httpd-php-source .phps .bar
If php3 :
AddType application/x-httpd-php3-source .phps .bar
Added .bar as well to show you can do it anyway you want. YOU are in
control! Play with it and you will find much joy in your life. Oh, this
assumes you are running apache though, hmm. Ideally you are ;-)
Philip
> Hi,
>
> A friend once told me you could view the source of a script on the internet
> by typing in "file.phps". Is this correct? I cannot seem to get it to work.
>
> --
> Thanks,
>
> Robert Baird
> http://www.MacDeusEx.com
> http://macdeusex.insidemacgames.net
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>