SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Aug 20, 2001, 11:44 #1
- Join Date
- May 2001
- Location
- Malaysia
- Posts
- 216
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is it mandatory to save PHP code in .PHP extention?
Assuminng the below codes and I want to save it in .SHTML extention. will it still work?
<head>
<body>
<table>
<tr><td>
<font face="verdana" size="1">Test Page.....</font></td></tr>
</td></tr>
<tr><td>
<?php
chdir($DOCUMENT_ROOT . "/vb_folder");
require("./global.php");
chdir($DOCUMENT_ROOT . "/whateverthefoldernameis");
if ($bbuserinfo['userid']==0) {
echo"<center><font size=1 color=red style=verdana>You need to log in!</font>";
}
else
{
$username=$bbuserinfo['username'];
}
?>
</td></tr>
</table>
</body>
</html>Your WebHosting Partner - RouterWebHost.com
eXam SIMulation Software - ExamSim.net
geeks forums -ProgrammingTutor.com
BMWClub of Malaysia - BMWClub.com.my
unofficial MU Fan Club coming soon - ManchesterUnited.com.my
-
Aug 20, 2001, 11:47 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Not unless you specify that in a .htaccess fiel or in your server config file assuming your are using Apache. Also I am not sure as to whether your server config will have a conflict of interest so to speak, because if your server is set up to parse .shtml files as SSI, then I think it might have a problem with trying to parse it as PHP at the same time.
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Aug 20, 2001, 11:51 #3
- Join Date
- May 2001
- Location
- Malaysia
- Posts
- 216
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes I'm using Apache.
OS is RedHat 7.1
If I can get this work then I don't have to convert all my files into .PHPYour WebHosting Partner - RouterWebHost.com
eXam SIMulation Software - ExamSim.net
geeks forums -ProgrammingTutor.com
BMWClub of Malaysia - BMWClub.com.my
unofficial MU Fan Club coming soon - ManchesterUnited.com.my
-
Aug 20, 2001, 11:55 #4
- Join Date
- Oct 2000
- Location
- Austin, TX
- Posts
- 1,438
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Add AddType application/x-httpd-php .html to your httpd.conf
ck :: bringing chris to the masses.
-
Aug 20, 2001, 12:03 #5
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Anarchos, he wants to use .shtml extensions not .html, do you think Apache will complain if he has .shtml already set to parse as SSI?
Please don't PM me with questions.
Use the forums, that is what they are here for.
Bookmarks