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.
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
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...
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
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.
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
Bookmarks