Jump to content


Photo

php problem


  • Please log in to reply
3 replies to this topic

#1 allan08

allan08
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 06 June 2006 - 12:59 PM

I am having problems in using php cause whenever i try to open the php scripts on the web browser it opens the same script that i have already written on my notepad. I think the problem is in my php folder somewhere but i can't seem to figure it out because im only a newbie when it comes to php. I try to open my script on my web browser and in the script i only use html tags and it worked. But when i try to use php tags i get the same scipt written in my script that i have created before opening and running the scripts in my web browser. I need help ASAP.........................ASAP.

#2 witt

witt
  • Members
  • PipPipPip
  • Advanced Member
  • 36 posts

Posted 06 June 2006 - 01:04 PM

Sounds like you don't have php installed or it's not set up properly. If you don't have php/mysql/apache installed, just download wampserver.

[a href=\"http://www.en.wampserver.com/\" target=\"_blank\"]http://www.en.wampserver.com/[/a]

#3 allan08

allan08
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 11 June 2006 - 11:37 AM

thank you for replying in my post but i have installed php in my computer actually it is phptriad2.2. I also tried wampserver and i get the same results can u tell me what is wrong with it?

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 11 June 2006 - 01:22 PM

If you want to run your php scripts you need to store them in the folder that is viewable by the webserver, for WAMP it C:\wamp\www, then you go to [a href=\"http://localhost/filename.php\" target=\"_blank\"]http://localhost/filename.php[/a]

You cannot run a php file like can with a html where you double click it and it opens up in your defualt web browser. Web browsers only understand client side code which is HTML, CSS and Javascript. It doesn't know what PHP is and so it displays it in the browser window. PHP is server side code and so requires a web server that has PHP installed on it inorder for the PHP code to be parsed.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users