View previous topic :: View next topic |
Author |
Message |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Tue Aug 31, 2004 12:51 pm Post subject: Runing muitable pages Help |
|
|
does any one got a php script to Run muitable pages
with one script ? |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Aug 31, 2004 5:13 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Wed Sep 01, 2004 11:16 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Sep 01, 2004 2:33 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Sat Sep 04, 2004 6:21 pm Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Sep 04, 2004 10:13 pm Post subject: |
|
|
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 |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Sun Sep 05, 2004 3:40 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sun Sep 05, 2004 1:44 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Sun Sep 05, 2004 4:24 pm Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sun Sep 05, 2004 4:35 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Mon Sep 13, 2004 1:06 am Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Sep 13, 2004 2:01 am Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Mon Sep 13, 2004 6:03 pm Post subject: |
|
|
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 |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Sep 13, 2004 6:22 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Mon Sep 13, 2004 7:07 pm Post subject: |
|
|
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 |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Mon Sep 13, 2004 7:29 pm Post subject: |
|
|
lose the = sign _________________
 |
|
Back to top |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Mon Sep 13, 2004 7:48 pm Post subject: |
|
|
now i am geting Code: | Parse error: parse error, unexpected T_ECHO in C:\Server\WWW\Test.php on line 4
|
|
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Sep 13, 2004 9:00 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Mon Sep 13, 2004 10:16 pm Post subject: |
|
|
so it can't be done like i want is that what you are saying |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Sep 13, 2004 10:48 pm Post subject: |
|
|
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 |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Mon Sep 13, 2004 11:46 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Tue Sep 14, 2004 5:45 am Post subject: |
|
|
no it hase to have ever page html in it so it can be seen on that part of the script |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Sep 14, 2004 5:56 am Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Thu Sep 16, 2004 4:08 pm Post subject: |
|
|
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 |
|
 |
Override -
Joined: 25 Nov 2003 Posts: 124 Location: Virtual Abyss N Area 61
|
Posted: Thu Sep 16, 2004 4:37 pm Post subject: |
|
|
N/M i got it dua me lol this is what i done
Code: | $id = $_GET["rid"]; |
ty agan k1ll3rdr4g0n
now i put all my web pages in one script no more .htmls he he he ty ty |
|
Back to top |
|
 |
|