Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] php

Started by Game P Nov 30, 2010 at 4:45 AM 14 replies 2.5k views
Original Post
Game P
Game P
hii every one


i have php page

and main page (index.html)

i want put link link in the main page to php page



how can i do that?


thank you


Cygnus_X
Cygnus_X
http://lmgtfy.com/?q=how+to+make+a+link+to+go+to+a+.php+page
Game P
Game P
thanks for every one


May be my question is not clear enough.



I know How make link by html
I have tried it but it does not work

when I click on the link , Show me a page that contains PHP Code.


and

I Have tried to search on Google also!!!!

I'm waiting answer for my problem


thank you
Atrix256
Atrix256
It sounds like your server doesn't have php installed.

Do you have these pages up on a server or are you just looking at an HTML file on your own computer in your browser?

If you are just looking at a file on your own computer (ie c:\...blah..\index.html), sorry, you can't run PHP that way.

You need to find a host or install a web server and php on your own computer which will probably be very difficult with your level of experience!

[Edited by - Atrix256 on December 1, 2010 12:21:04 AM]
leiavoia
leiavoia
PHP files will not work by themselves.

Your PHP files needs to run on a server that has a php interpreter installed. This is usually apache with the php module installed. You can get it for many operating systems for free.

try this page for example (assuming you are using Windows).

otherwise, google "how to install php and apache"
jsaade
jsaade
I think you should start here:
http://www.w3schools.com/php/php_intro.asp
Game P
Game P
hii


I've already installed the apache and put all my files to it.


my problem again

I have a main page (index.html) and when I put a link to a PHP page (game.php) and I click on it I get a page that contains PHP Code



But when I change extension of main page to (index.php), the link to a PHP page (game.php) works


I want the main page .html not .php

How can I do that


Thank You
Cygnus_X
Cygnus_X
Why do you want your URL to show .html in lieu of the .php extension?

If this is because you're worried most users will type yourdomainname.com/index.html, you can either forward them to index.php OR rest assured that most people these days just type yourdomainname.com. Having the .php extension is not a bad thing as I'd be willing to bet that most users ignore this.

There are also solutions with apache (see above post), but these are slightly difficult.

What is your motivation for changing it?
phresnel
phresnel
Quote:
Original post by Cygnus_X
If this is because you're worried most users will type yourdomainname.com/index.html, you can either forward them to index.php OR rest assured that most people these days just type yourdomainname.com. Having the .php extension is not a bad thing as I'd be willing to bet that most users ignore this.


On top of that, even amazon and many other big players shows aspx extensions (afair).
Game P
Game P


Thank You very much



really

You are good members in good forum
annyphp
annyphp
PHP files will not work by themselves.

Your PHP files needs to run on a server that has a php interpreter installed. This is usually apache with the php module installed. You can get it for many operating systems for free.
If you are trouble ,php tutorial you can found on PHPKode.com---http://www.phpkode.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.