|
-
Dec 14th, 2004, 05:00 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Alternate to PHP?
I have this php code:
PHP Code:
$array = file("test.txt");
shuffle($array);
for ($i=0; $i<20; $i++) {
echo $array[$i];
}
and I want to rewrite it in a language that will allow me to keep the .html extension of my webpage, is there a language that would be good at this? I didn't think javascript would be good, but maybe vbscript or something, i'm not sure.
Last edited by stickman373; Dec 14th, 2004 at 07:15 PM.
-
Dec 14th, 2004, 05:59 PM
#2
Re: Alternate to PHP?
This is a web server configuration issue. Your web server is configured to treat files with a .php extensions as PHP files and sned them via the PHP interpreter, all you need to do to get html files treated the same is to ask the web server to send them through the PHP interpreter too.
Are you using Apache and do they support .htaccess files?
-
Dec 14th, 2004, 06:13 PM
#3
Thread Starter
Fanatic Member
Re: Alternate to PHP?
It's a webhost, I doubt they will change the configuration for me haha.
-
Dec 14th, 2004, 06:39 PM
#4
Re: Alternate to PHP?
This is why I ask if they use Apache. Apache allows per directory configuration through the use of .htaccess files. Your web host should allow you to use them if they use Apache, if they don't allow it, then start looking for a new web host
-
Dec 14th, 2004, 06:47 PM
#5
Thread Starter
Fanatic Member
Re: Alternate to PHP?
yes they run Apache 1.3.29 (Unix)
how would I go about the per directory configuration?
-
Dec 14th, 2004, 06:48 PM
#6
Thread Starter
Fanatic Member
Re: Alternate to PHP?
Oh nevermind, I found it in the cpanel under apache handlers.
Thanks for the help
-
Dec 14th, 2004, 06:57 PM
#7
Re: Alternate to PHP?
To do it manually you would need to create file called .htaccess in the directory of your script and add the following lines:
Code:
AddHandler php-handler-name .html .php
P.s: Don't forget to add resolved to your thread, if you have found your solution.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|