good day dear opensuse-experts,
running opensuse 42.3 - i look forward to the release of Version 15
i just run some scripts that need the inclusion of simple_html_dom. i need to put this into the same folder, in which my testscript resides:
btw-, the projectpage looks like down : see http://simplehtmldom.sourceforge.net/manual.htm
Project web is currently offline pending the final migration of its data to our new datacenter.
funny:** i download it form Sourceforge:
But: what is pretty important: The php-extension (simple_html_dom) should be found by my testscript.
It should probably include(simple_html_dom.php);
in other words: it’s should be in the same folder as my testscript:
if not - then i would need to use the relative path to it.
So i have two options.
a- put the extension into the same folder as the testscript remains or
b- use the correct path
how to apply the option a - putting the extension to the same folder?
I don’t write PHP but if the PHP DOM works like all the other languages I’ve worked worth (IMO likely), you wouldn’t put phpsimplehtmldom into a script folder.
A DOM is the foundation of a web page which states the various elements and basic functionality that the individual tagged content on the page can act upon. As such, you’d think that the foundation of what happens in a page should be set as the page loads and shouldn’t be modified later (but see the last reference in this post)
So, typically the DOM is referenced at the top of each web page code (web pages in general and HTML or other predominantly text-type code is always read in sequence from top to bottom on the page), and the DOM file itself is normally placed in the root of the website code for easy reference.
PHP.net documentation of what a PHP DOM is, including an example deployment in the User contributions
An example, doesn’t say how it’s deployed but it looks like it simply replaces the first element of the PHP page (yes, all that replaces the first line)
The following looks like it might be intended to inject a DOM modification and might be placed in the content <BODY> which is an approach I’m not familiar with, but might be acceptable practice in PHP (again, I’m not actually a PHP coder). Might be an approach close to how you think it should work
hello dear tsu2,
many thanks for the continued support - as i understand i do not have to put the extension into the same folder like the test-script.
i will have a closer look at the documents you have mentioned.
btw. the orignial-docs are back online again
I will read through all the docs and will do some trials. I keep you informed.