Jump to content

Running a simple PHP script


simpgm25

Recommended Posts

I work on a small net work that has a W2K web server running IIS 5.0. We have PHP installed and it works on our web site. I did not write this web site. I am in school learning about web programming. Right now I just want to get a simple php script to run. Period! My question is this. Does a PHP file have to be run from a web site that is PHP functional or can you just create a PHP file on a server that has php and IIS installed and run it in a folder in the C drive for testing? Right now I am just trying the famous echo "Hello world;" example.
Simeon Bryant
Link to comment
https://forums.phpfreaks.com/topic/29810-running-a-simple-php-script/
Share on other sites

I appreciate you guys help.

Our web sever is IIS and we have a web site currently running on it using php. When you set up a website in IIS you have to go under the home folder tab and then configuration and make sure that the php extension is in there. Thats how our current site is and it works. That's why I asked in my first question, does the php file have to be running off of a web site that is set up in IIS? I just want to be able to test php files for practice. I still don't have it working. I know this is very simple but I am just spinning my wheels.
Simeon
I'm guessing you know that you need <?  ?> around the php code... also check the configuration off the IIS. I think you can specify what file extentions to process php code.  Like .htm, .html, .php make sure your extention is one that it will look for the php.

-John

Archived

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

×
×
  • Create New...

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.