WordPress.org

Support

Support » Miscellaneous » Show php codes with phps

Show php codes with phps

  • Ive made tutorials on customizing your wp, so I would like to be able to show the codes online, but…
    Ive saved the files as phps, but when I try to look at them online, there pops up a message on whether I want to save or open the document.. How do I change that, so the codes just show??

Viewing 6 replies - 1 through 6 (of 6 total)
  • Lester Chan
    Participant

    @gamerz

    hmm, y not just renamed to .txt?

    Cena
    Participant

    @cena

    The ability to display .phps in a browser depends on your Apache server settings.
    LoadModule php4_module /usr/local/apache/libexec/libphp4.so
    <IfModule mod_mime.c>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    </IfModule >
    has to be included in the httpd.conf file, which you may not have access to. You’d need to contact your server administrator to have it included.

    Thanks. Ill try out both…

    Lester Chan
    Participant

    @gamerz

    if not u can uise php functions called show_source() i think

    You can also post it to the wiki, which does syntax highlighting. (Check out the my-hacks.php page.)

    <IfModule mod_mime.c>
    AddType application/x-httpd-php-source .phps
    </IfModule >
    Is all you’ll need. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show php codes with phps’ is closed to new replies.