Results 1 to 7 of 7

Thread: [RESOLVED] Alternate to PHP?

  1. #1

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    [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.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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?
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    Re: Alternate to PHP?

    It's a webhost, I doubt they will change the configuration for me haha.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    Re: Alternate to PHP?

    yes they run Apache 1.3.29 (Unix)

    how would I go about the per directory configuration?

  6. #6

    Thread Starter
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909

    Re: Alternate to PHP?

    Oh nevermind, I found it in the cpanel under apache handlers.

    Thanks for the help

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width