www.webdeveloper.com
Results 1 to 7 of 7

Thread: HTML Tidy without HTML Tidy?

  1. #1
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859

    HTML Tidy without HTML Tidy?

    Hey PHPers!

    I just have a quick question. Does anyone know of a PHP script/class/etc that will allow me to have some of the functions of HTML Tidy without actually needing the built-in HTML Tidy library of PHP? I need it to not be reliant on the HTML Tidy library of PHP because my current web hosting provider does not support HTML Tidy and I have talked with them and they have no intentions of supporting it in the near future. I'm mostly interested in the output formatting features of HTML Tidy. Like proper source code indention and such.

    I have been searching high and low but have so far not been able to find anything...

    Any help on this matter would be greatly appreciated.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,252
    I'm not aware of any PHP alternatives. If the Tidy C executable is on your host, you might be able to interface with it via shell_exec() or exec(). Otherwise, good hunting.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Well, that is an idea I hadn't thought of... I'm going to try that. Thanks for that.

    I'll post again if it works out.

  4. #4
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Ok, forgive my stupidity but, what is the Tidy C executable? Is it something I can just download and upload to my web space? If so, where do I download it from? I'm confused...

  5. #5
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,252
    http://tidy.sourceforge.net/

    If there is an appropriate executable for your host's platform, you could upload it. Otherwise, you would need to upload the source code and compile it (probably not allowed on a shared host).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  6. #6
    Join Date
    Feb 2003
    Location
    Aberdeen, Washington, USA
    Posts
    1,859
    Alright, I downloaded this one. I think that's right. My host runs Linux. But, I extracted the files called "tidy" and "tab2space" but they are extension-less. Like, they have nothing like ".exe" or anything like that. Is that how it's supposed to be? Do I upload it to my space just like that? Or maybe I need to add an extension to them? But what extension would I add? What do you think? Thanks for your help.

  7. #7
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,252
    UNIX and Linux do not care at all what file suffixes you use; all that matters is whether or not you have execute permission on the file. Therefore you probably will want "755" permission set on the file: read/write/execute for you, read/execute for everyone else (including the Apache user).
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles