emacs and PHP?

Discussion in 'macOS' started by Benjamindaines, Mar 11, 2009.

  1. Benjamindaines macrumors 68030

    Benjamindaines

    Joined:
    Mar 24, 2005
    Location:
    A religiously oppressed state
    #1
    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...
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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?
     
  3. CANEHDN macrumors 6502a

    CANEHDN

    Joined:
    Dec 12, 2005
    Location:
    Eagle Mountain, UT
    #3
    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.
     

Share This Page