PHP Page Browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

PHP Page Browser

Post by Benrr101 »

I am wondering, is it possible to find a program that will load a PHP page already processed?

In other words is there a program that will veiw PHP pages the way they are ment to be seen?

I am desperate to find an answer to this, becuase time is a factor! A very big factor. So please hurry with the answer.

It may help if I tell you that I am running PWS 4.0 on Windows 98 and I have PHP 5.0 installed. It does not work tho. I would like to know the answer to my first problem before I get an answer to the second.

Thanks

I really need that answer!
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

You could upload the file to a server you know is working, and see if it works. Although, if your server doesn't work, it doesn't matter if the PHP files are working :)
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd say, installing apache 1.3.31 or whatever is the newest would be a good solutions.. you can have it/mysql/php installed in an hour generally..
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

Well, I'd like to do that but I'm not allowed. I just want to process the files.

I can't upload them becuase I don't have Inet connections where I'm going to be at.
ldomingues
Forum Commoner
Posts: 41
Joined: Fri Aug 06, 2004 1:15 pm
Location: Portugal

Post by ldomingues »

For windows OS i'd recommend using a bundle that includes apache and php, like bigapache or phptriad.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can install apache on win98, it doesn't absolutely require an internet connection, just an IP.. which you will get with a network card.
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

But why can't I just get a program that'll veiw the pages? Or why won't PWS work for me? Or why can't my PWS load a page besides the defult page? I need to figure this out before my 4-H judging! Or I can just make all my pages not use PHP, but that'll take me hours!
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

well, doesn't the usual way of setting the PHP (I mean reading the manual: http://www.php.net/manual/en/install.iis.php at least) work for you?
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

Well, I have this file called IISconfig.exe, but anytime I run it it gives me an error saying some DLL file is missing,
Maybe I will install apache
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

I suppose if Apache is the only way to get my

Code: Select all

<?PHP include ("page") ?>
code to work,

I guess I'll have to.

The code above is all the code I use I only use to save me the trouble of updating everylink if one page changes. I just change my links to

Code: Select all

ztemp.freeprohost.com/index.php?page=news.html
Like that, If you can give me another way to do that, I'd apreciate it, but I'd like it if you can just explain how to get Apache installed with PHP (or i'll use bigAbache) or how to get PWS to work... :x

Thanks, becuase I need all the help I can get. :(
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uhh... :?

Code: Select all

<?php include("page") ?>
would attempt to load a file named "page".

try this instead:

Code: Select all

<?php

include (isset($_GET['page']) && is_file($_GET['page'])) ?  $_GET['page'] : 'your_default_include';

?>
however, be very very very careful with doing stuff blindly like this, as you could be asked to include a file you didn't intend to.. which could give someone a lot of ability to retrieve sensitive information from your server...
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

I understand, but the code that I use now works just fine,
"page" acts as a variable and in the link, index.php?page=news.html, page gets a value, which means that the code would actually be

Code: Select all

<?php include("news.html") ?>
which would include news.html

am I right??? if not, just see that my page actually works with the code. go to ztemp.freeprohost.com/index.php?page=news.html see if it works!

I got it from http://www.e-zelda.com

But I'm happy with it.

Oh, and I can't download bigapache, it's 101 megs!
Maybe I should give up... all I wanted was a program that would display preprocessed PHP code....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it'd have to be $page, not page.. as page isn't a variable without the $ .. :?
Benrr101
Forum Newbie
Posts: 7
Joined: Thu Aug 05, 2004 4:00 pm
Location: USA (wanna be in Canada)
Contact:

Post by Benrr101 »

Oh well, it dosen't matter...

Maybe I should clarify -- I want a program that will process PHP pages... Is that actually possible???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah through SAPI I believe.. if you want to write your own stand alone application.. but running it through apache would be easier to set up if needed quickly..
Post Reply