Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Anyway to open a PHP file and view its code in the browser?

0 views
Skip to first unread message

Kevin Stone

unread,
Feb 14, 2002, 3:26:13 PM2/14/02
to php-g...@lists.php.net
How can I open a local PHP script and view its code to the browser? The
Readfile() method appears to parse and execute the code. The Fopen()
method appears to parse and then not execute the code, leaving a blank
screen, or at the very least displaying any non-PHP text existing in the
script. This is obviously rare question because I can't find any
references on this list or on Usenet. Is there a trick to this? Or is
it simply not possible.

Much Thanks,
Kevin Stone <Ke...@helpelf.com>

Anas Mughal

unread,
Feb 15, 2002, 10:54:55 AM2/15/02
to Kevin Stone, php-g...@lists.php.net
If you are on the same machine, why don't you just
open the file as follows:

file:/filename.php

Just don't go thru the webserver.


=====
Anas Mughal
anasm...@yahoo.com
anasm...@hotmail.com
Tel: 973-249-6665

__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail
http://mail.yahoo.com

Ashley M. Kirchner

unread,
Feb 15, 2002, 1:14:02 PM2/15/02
to Kevin Stone, PHP-General List
Kevin Stone wrote:

> Thanks for proving the point. It's like I said. No one is willing to
> explain what symbolic links are. -Kevin

You just didn't search well enough:

http://pucc.princeton.edu/~clients/symlink.readme

--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ash...@pcraft.com> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.

Ashley M. Kirchner

unread,
Feb 15, 2002, 1:15:40 PM2/15/02
to Kevin Stone, PHP-General List
Kevin Stone wrote:

> Thanks for proving the point. It's like I said. No one is willing to
> explain what symbolic links are. -Kevin

I just realized that URL talks about backing up symbolic links, as
opposed to doing an indepth explanation of what they are. Never the less,
at the top it does say what a symlink is:

"A UNIX symbolic link is a file that contains a pointer to another file
or directory."

One could say, it's like creating a Shortcut on a Win9x (and up)
platform.

Kevin Stone

unread,
Feb 15, 2002, 1:08:15 PM2/15/02
to Erik Price, php-g...@lists.php.net
Thanks for proving the point. It's like I said. No one is willing to
explain what symbolic links are. -Kevin

> -----Original Message-----
> From: Erik Price [mailto:pri...@hhbrown.com]
> Sent: Friday, February 15, 2002 8:41 AM
> To: Kevin Stone
> Subject: Re: [PHP] Anyway to open a PHP file and view its code in the
> browser?
>
>
> On Thursday, February 14, 2002, at 05:44 PM, Kevin Stone wrote:
>
> > I did a net wide search on Symbolic links to learn what they are and
how
> > to use them. Wouldn't you know everyone's talking about them but no
one
> > explains what they are or how to use them.
>
> It's because it's a very common thing in Unix, about as basic as copy
> and paste is in Windows. And Unix is the widest-used platform on the
> web, so a lot of web people are familiar with it. I'm not sure what
the
> Windows equivalent is.
>
> HTH,
>
>
> - Erik
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pri...@hhbrown.com

Erik Price

unread,
Feb 15, 2002, 1:51:33 PM2/15/02
to Kevin Stone, php-g...@lists.php.net

On Friday, February 15, 2002, at 01:08 PM, Kevin Stone wrote:

> Thanks for proving the point. It's like I said. No one is willing to
> explain what symbolic links are. -Kevin

Actually, if you inspect the message I sent you (it's quoted below),
you'll see that the specific part of your original post that I quoted is
the part about how difficult it is to find information on them, and why
no one seems to explain them. I never intended to explain them to you,
because I thought that someone else on the list had already taken care
of that.

If you're still curious, the following document explains all about the
filesystem used on Unix -- and is very readable (not some obscure
technical document). Please read it:

http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-
HOWTO/disk-layout.html

This is part of Eric Raymond's "Unix and Internet Fundamentals" How-To
document. Even for people who really could care less about Unix, it
explains pretty much how computers work in general. I found it very
informative when I first set about learning everything there is to know
about computers.

http://www.linuxdoc.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/


HTH,


Erik

Ashley M. Kirchner

unread,
Feb 15, 2002, 1:20:17 PM2/15/02
to Kevin Stone, PHP-General List
Kevin Stone wrote:

> Thanks for proving the point. It's like I said. No one is willing to
> explain what symbolic links are. -Kevin

This is probably a better explanation:

http://kb.indiana.edu/data/abbe.html

0 new messages