Path info - how do you save a page as <?name?>

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

Post Reply
zander213
Forum Newbie
Posts: 13
Joined: Mon Aug 23, 2004 1:46 pm

Path info - how do you save a page as <?name?>

Post by zander213 »

I am using dreamweaver to edit a php page. How do I save a page that contains a php string in the name of the page?

Ex: website.com/<?php echo $row['name']; ?>.php

Any help would be greatly appreciated!
Last edited by zander213 on Tue Nov 09, 2004 12:14 pm, edited 1 time in total.
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

I don't think you can :cry:
What is the purpose of doing so?
User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

if your saying your editting a script someone else made and your thinking thats a real page its most likely not. Here are two examples:

Vitual Page: page.php?id=4
Real Page: page4.php

The virtual page isn't actually there most of the times. What appears in a web browser all depends on whats in the id=

In your case I'm not sure though because there is another .php at the end.

Could you provide more information?
zander213
Forum Newbie
Posts: 13
Joined: Mon Aug 23, 2004 1:46 pm

Post by zander213 »

I have 2 pages that I am creating...

Page A is a list of all items on one page. Each link on this page points to each individual item:
website.com/<?php echo $row['item']; ?>.php

My question is - how do I set up Page B so the links from Page A will open the correct item in Page B?

Do I have to save each Page B as :
<?php echo $row['item']; ?>.php

Or am I confused here?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

zander213 wrote: Or am I confused here?
Certainly you are. Page A is supposed to be preprocessed by PHP interpreter on the fly, yielding something like this:

Code: Select all

website.com/1.php
website.com/2.php 
website.com/3.php 
//.... and so on
There would be not necessarily numbers, it all depends on the contents of $row['item'] variable when the page is preprocessed.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

is this the same problem?

viewtopic.php?t=27534&highlight=
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

seems like it is. zander213, do not create several threads regarding the same problem.
Post Reply