Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Benjamindaines

macrumors 68030
Original poster
I'm trying to write some PHP code using emacs (in Terminal), but whenever I save it as a .php file it opens up as a blank document in Text Edit or load it up to the server. How do I get this to work?

Odd thing... if I put a non-code character before my php / html code the file works as it should...
 
Have you tried opening the saved file in a different application? I suggest TextWrangler or Smultron, both free. Sometimes TextEdit has issues with programming files for the web. Also can you post the contents of a file?
 
You're not going to be able to run a php file on your computer unless you have the php services running and you're using the computer as a php server. If you know what you're doing and are able to load php files, you'll need to post the code so we can see the code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.