View Full Version : HTML help
Aug 30, 2008, 10:11 AM
I wrote a simple html script using text editor. my apache server is up and running. I have given full permissions to my html file. I am still not able to run it. I dont get the desired result on my browser. I get the script itself. can someone please tell me how i go about just running html scripts?
Aug 30, 2008, 11:10 AM
If you used TextEdit, make sure your file is saved as a text only (not rich text) format.
Or better yet, download TextWrangler (http://www.barebones.com/products/textwrangler/), or another text editor and use that for html editing.
Aug 30, 2008, 11:23 AM
Aug 30, 2008, 03:45 PM
Seconded for each of the previous replies, but there is an additional thing to know. If you are already using another scripting language like PHP here, the file is saved as plain text, and you are running apache with the required preprocessor, make sure you are accessing the page through http://localhost/ rather than opening the through File > Open in your browser. You need to be going through http: rather than file: for the results you want.
As another note, you would probably get more interest if the thread were in one of the web forums rather than Mac programming. This forum should really be used for Xcode and other non-web programming topics.
Best of luck
Aug 30, 2008, 03:50 PM
Is the script running locally or on a remote server?
What is the file extension for HTML page?
What does your DirectoryIndex setting in your httpd.conf file say?
Aug 30, 2008, 05:17 PM
If you are seeing the text and not running the script you probably need to change the file name to be the proper extension instead of html. PERL would .pl, Python py and so on.