Wanted To Convert Php Site To Html......please help friends

Started on the old forum in June 2011 · view the original in the archive · old links redirect here

#php-to-html

8 replies · 835 views · started 15 years ago · 1 min read

6 participants
zong11 Developer · 98 posts #1

Friends i want to convert my site from php to html. So please tell me how to convert this in to html. I am using sea script.

Always Help Needy Peoples !!!!!

metulj Super moderator Principal · 1,726 posts #2

zong11 wrote: Friends i want to convert my site from php to html. So please tell me how to convert this in to html. I am using sea script.

why would you want to convert from dynamic to static ?

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

zong11 Developer · 98 posts #4

Friends i just want to convert links in to html.....so hw can i do that???? As like index.php?id=4489 --------> /Games-Zone/1.html please help....

Always Help Needy Peoples !!!!!

antony2kx Developer · 94 posts #5

create a .htacess file

if your link is like index.php?action=action&id=integer

just write

RewriteEngine on

RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+) /content/$1/$2.html [L]
RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+[\.html]) /content/$1/$2 [l]
RewriteRule ^/index.php?action=([a-zA-Z0-9\_\-\+]+)&id=([0-9]+) /content/$1/$2 [l]

Forgot to flag sorry

This will take alot of time in your project to rewrite everything so its better to

build your site around this

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

RewriteCond %{HTTP_HOST} ^domain.com/ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

when you do this you can get the / poriton of the uri in segments, so the uri will look like this

domain.com/controller/action/param/param

getting individuals parts is ease

function getArguments($uri)
{
   $url_array = array();
   $uri = trim($uri);

   $args = explode("/", $uri);
  array_shift($args) // removes first element from array empty
   foreach($arg as $a)
   {
      if(preg_match("/^([a-zA-Z\-\_\+]+)$/", $a))
     {
        push($a, $url_array);
     }

 }

return $url_array;

}

then

look at domain.com/controller/action/params

call function

$parts= getArhuments($_SERVER['REQUEST_URI']);

echo "controller:".$parts[0];
echo "action:".$parts[1];
echo "params:".$parts[2];

thats basically it sp u can create ur very own simple MODEL VIEW CONTROLLER FRAMEWORK

kei_ki7 Senior · 431 posts #8

Search for mod_rewrite in here or google

Did I help you? You can help me too Your donations will help me finance my studies.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close