Jump to content

Archived

This topic is now archived and is closed to further replies.

allan08

php problem

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.