Runing muitable pages Help

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Tue Aug 31, 2004 12:51 pm    Post subject: Runing muitable pages Help Reply with quote

does any one got a php script to Run muitable pages
with one script ?
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Aug 31, 2004 5:13 pm    Post subject: Reply with quote

Dude ! What in the heck are you talking about ?

We already went over the vhosting many times already , it won't
be available untill the final release or on the Pro version betas.

::Virtual Host Creator:: Your Friend
http://www.multiple-sites.tk
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Wed Sep 01, 2004 11:16 am    Post subject: Reply with quote

i ant talking about Virtual Host i am talking about 1 php script
that will run like 10 or 12 pages in stead of say index.html index1.html index2.html & so one that is 3html files ok is there a way i can put then all in one file ? in stead of a bunch of files?
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Sep 01, 2004 2:33 pm    Post subject: Reply with quote

No , as I said on the website , you can only use a folder or an aliases but
you can put all your websites in your main htdocs but make sure some don't
get over written. Its up to you , we all want the Virtual Hosts feature. LateR!
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Sat Sep 04, 2004 6:21 pm    Post subject: Reply with quote

i am not taling about Virtual Hosts & the main htdocs folder is what i am taling about i want a php script that will put all htmls to gether in one file
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sat Sep 04, 2004 10:13 pm    Post subject: Reply with quote

Can you give a better example , I didn't quit understand what you where
talking about at first and it kind of sounded like the Virtual Hosting ?
Back to top View user's profile Send private message Visit poster's website
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Sun Sep 05, 2004 3:40 am    Post subject: Reply with quote

Hes talking about www.somesite.com/index.php?section=somename
and all the info for the site is in index.php

I was working on a script for this, but seeing i know very little of php it probably wont be out.
_________________
Back to top View user's profile Send private message AIM Address
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Sep 05, 2004 1:44 pm    Post subject: Reply with quote

If it sounded like that , I would have already written the script , oh well.

Code:

<?php
if ($id=="1") {
header ("Location: index1.html");
exit;
}
if ($id=="2") {
header ("Location: index2.html");
exit;
}
if ($id=="3") {
header ("Location: index3.html");
exit;
}
}else{
echo "Link does not exist !";
}
?>


Then just link to the files like file.php?id=1 where id is the link number

Edit: I added the exit; to make sure no other code gets executed after
being targeted with the correct link tag , good programming practice !


Last edited by TRUSTAbyss on Mon Sep 13, 2004 2:08 am; edited 2 times in total
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Sun Sep 05, 2004 4:24 pm    Post subject: Reply with quote

Thinks that is some what like that but want all of the html code in the spots like you have like index1.html and so on so that one script would generate many pages if you can find a script or know of one please let me know
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Sep 05, 2004 4:35 pm    Post subject: Reply with quote

Are you talking about a script that can create index pages and put them
each into a seperate directory , it is possible but you have to write a little
more code than what I have their , may I ask why you want to do this ?
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Mon Sep 13, 2004 1:06 am    Post subject: Reply with quote

well i am trying to do 1 php script to do like 30 or 40 pages ok now the problm is i want the script to have all of my htmls in it like

Code:
<HTML>
<HEAD>
<TITLE>1</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>

<HTML>
<HEAD>
<TITLE>2</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>

<HTML>
<HEAD>
<TITLE>3</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>


like that in the php code for ever page to me in side of one file you see what i am taling about
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Sep 13, 2004 2:01 am    Post subject: Reply with quote

Yes , all you have to do is replace header with echo and type your HTML but
be sure you know how to escape the parse errors if you do do this , I would
just put them all in seperate files and use the first example I showed you.
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Mon Sep 13, 2004 6:03 pm    Post subject: Reply with quote

so is this some what like you are talking about

Code:
<?php
 
if ($id=="1") {
header ("<HTML>
<HEAD>
<TITLE>1</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>");

exit;
}

if ($id=="2") {
header ("<HTML>
<HEAD>
<TITLE>2</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>");

exit;
}
 
if ($id=="3") {
header ("<HTML>
<HEAD>
<TITLE>3</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>");

exit;
}
 
}else{
echo "Link does not exist !";
}

?>
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Sep 13, 2004 6:22 pm    Post subject: Reply with quote

Actually , you only need the HTML main tags only one time , you then just
type the other html code in the HTML CODE HERE place and then it should
work for you , remember to use echo instead of header. Later!

Code:

<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<?php
if ($id=="1") {
echo "HTML CODE HERE";
}
if ($id=="2") {
echo "HTML CODE HERE";
}
if ($id=="3") {
echo "HTML CODE HERE";
}
}else{
echo "Link does not exist !";
}
?>
</BODY>
</HTML>


Note: You will probably see parse errors such as Error 200 if don't know how
to escape the code from being executed by the PHP interpreter so I suggest
that you use the first example that I gave you , it will work the same way
and be alot easier on you , just use the first example , its easier.
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Mon Sep 13, 2004 7:07 pm    Post subject: Reply with quote

ok this is what i got so far & the error it gives me

Code:
<?php
{
$if ($id=="1")
echo = '<HTML>
<HEAD>
<TITLE>Page 1</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>';

break;


$if ($id=="2")
echo = '<HTML>
<HEAD>
<TITLE>Page 2</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>';

break;

 
$if ($id=="3")
echo = '<HTML>
<HEAD>
<TITLE>Page 3</TITLE>
<HEAD>
<BODY>
</BODY>
</HTML>';

break;
}

?>


Code:
Parse error: parse error, unexpected T_ECHO in C:\Server\WWW\Test.php on line 4
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Mon Sep 13, 2004 7:29 pm    Post subject: Reply with quote

lose the = sign
_________________
Back to top View user's profile Send private message AIM Address
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Mon Sep 13, 2004 7:48 pm    Post subject: Reply with quote

now i am geting
Code:
Parse error: parse error, unexpected T_ECHO in C:\Server\WWW\Test.php on line 4
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Sep 13, 2004 9:00 pm    Post subject: Reply with quote

You have all kinds of errors in your code , you should use the first example
I gave you , don't you realize how much space you will be using up in your
PHP code if you use the second example , use the first , its easier.

Error Mistakes:

Never add a $ sign in if , bad idea ! $if () { - No! No!
Never use an = sign in echo , its a function !

Thats basicly all the errors I've spotted so far.
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Mon Sep 13, 2004 10:16 pm    Post subject: Reply with quote

so it can't be done like i want is that what you are saying
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Sep 13, 2004 10:48 pm    Post subject: Reply with quote

It can be done but you will have to edit all your HTML code from getting any
parse errors , what your wanting to do is just stupid , use the first example.
Back to top View user's profile Send private message Visit poster's website
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Mon Sep 13, 2004 11:46 pm    Post subject: Reply with quote

i think what hes looking for is this
Code:
<?php
// Here we will find the text after ?section=
$id = $_GET["section"];
//Here we will find out which even it will excute
  switch( $id )
{
// will excute if it is ?section=news
case "news":
$title = "news";
$main = 'some web code here';
include("yoursite.php");
// This means for the script to stop
break;
// will execute if ?section=something
case "something":
$somevariable = '';
include("yoursite.php");
break;
//This happens when there is nothing entered
//or it didnt excute any others
default:
$content = 'welcomem.php';
include("main1.php"); break;
}
?>

_________________
Back to top View user's profile Send private message AIM Address
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Tue Sep 14, 2004 5:45 am    Post subject: Reply with quote

no it hase to have ever page html in it so it can be seen on that part of the script
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Sep 14, 2004 5:56 am    Post subject: Reply with quote

If you use the first example I gave you using the headers , you can get the
exact same thing from what your talking about right now. this topic is old !
Back to top View user's profile Send private message Visit poster's website
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Thu Sep 16, 2004 4:08 pm    Post subject: Reply with quote

well i am just so sorry it is old any way it is 9:52 AM here i have been up all night long useing this forum & the help from the php web site & i got it to work & it all works good now ty k1ll3rdr4g0n that helped out a lot 1 ? though
now i want section part gone so when i go to a url it will be like this www.someserver.com/index.php?=rid1 in stead of www.someserver.com/index.php?section=rid1 i know i am a pain WEG
if you can help i would apperiate it a lot
Code:
<?php

$id = $_GET["section"];

switch( $id )
{
case "rid=1":

echo "<html>\n";
echo "<title>Page1</title>\n";
echo "<head>\n";
echo "<BODY bgcolor='#000000'>\n";
echo "</body>\n";
echo "</html>\n";
break;

case "rid=2":

echo "<html>\n";
echo "<title>Page2</title>\n";
echo "<head></head>\n";
echo "<BODY bgcolor='#FF0000'>\n";
echo "</body>\n";
echo "</html>\n";
break;

case "rid=3":

echo "<html>\n";
echo "<title>Page3</title>\n";
echo "<head></head>\n";
echo "<BODY bgcolor='#0000FF'>\n";
echo "</body>\n";
echo "</html>\n";
break;
}
?>
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Override
-


Joined: 25 Nov 2003
Posts: 124
Location: Virtual Abyss N Area 61

PostPosted: Thu Sep 16, 2004 4:37 pm    Post subject: Reply with quote

N/M i got it dua me lol this is what i done

Code:
$id = $_GET["rid"];


Code:
case "1":


ty agan k1ll3rdr4g0n

now i put all my web pages in one script no more .htmls he he he ty ty
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group