IncludeFromOther

This page tests including a subparagraph from another page, and include from multiple pages

Also see include from self.

The markup belows attempts to include a snippet out of another page. It works as it should.

(:include Test.IncludeFromSelf#anchor lines=1..2:)

This is a small paragraph with an anchor that has the name 'anchor' in page IncludeFromSelf.


Test that content from both pages is included

(:include IncludeFromSelf IncludeFromSelfPage :)

Also see include from other.

The markup belows attempts to include a snippet out of this page, but it doesn't work because include doesn't allow for that (yet...).

(:include Test.IncludeFromSelf#anchor lines=1..2 self=1:)

This is a small paragraph with an anchor that has the name 'anchor' in page IncludeFromSelf.

Below is the text from which include is supposed to extract the stuff to be included:

[[#anchor]]This is a small paragraph with an
anchor that has the name 'anchor' in page [[Test/IncludeFromSelf]]. 
[[#anchorend]]

This is a small paragraph with an anchor that has the name 'anchor' in page IncludeFromSelf.

It allows that, just add self=1 to allow the inclusion of the same page. --Petko February 02, 2009, at 04:33 AM


Test that content from both pages is included

(:include IncludeFromSelf#anchor#anchorend IncludeFromSelfPage#desc#desc-end  :)

This is a small paragraph with an anchor that has the name 'anchor' in page IncludeFromSelf.

Should, IMHO produce

(:include IncludeFromSelf#anchor#anchorend :)
(:include IncludeFromSelfPage#desc#desc-end  :)

This is a small paragraph with an anchor that has the name 'anchor' in page IncludeFromSelf. This is a paragraph starting with the label desc and ending with the paragraph desc-end in page IncludeFromSelfPage.

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Test%2fIncludeFromOther
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Test%2fIncludeFromOther
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Test/IncludeFromOther
            [REDIRECT_SCRIPT_URL] => /wiki/Test/IncludeFromOther
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afMEZuJF3k1rAxOxw6qxkQAAAIE
            [REDIRECT_URL] => /wiki/Test/IncludeFromOther
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 37496
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Test/IncludeFromOther
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Test/IncludeFromOther
            [SCRIPT_URL] => /wiki/Test/IncludeFromOther
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afMEZuJF3k1rAxOxw6qxkQAAAIE
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777534054.0471
            [REQUEST_TIME] => 1777534054
            [argv] => Array
                (
                    [0] => n=Test%2fIncludeFromOther
                )

            [argc] => 1
        )

)
 0: 00.00 00.00 EnablePost = 1, keys=
 1: 00.00 00.00 config start
 2: 00.03 00.01 config end
 3: 00.05 00.03 MarkupToHTML begin
 4: 00.05 00.03 MarkupToHTML begin
 5: 00.07 00.03 MarkupToHTML end
 6: 00.07 00.03 MarkupToHTML begin
 7: 00.07 00.04 MarkupToHTML begin
 8: 00.07 00.04 MarkupToHTML end
 9: 00.07 00.04 MarkupToHTML begin
10: 00.07 00.04 MarkupToHTML end
11: 00.08 00.04 MarkupToHTML end
12: 00.08 00.04 MarkupToHTML begin
13: 00.08 00.04 MarkupToHTML end
14: 00.08 00.04 MarkupToHTML begin
15: 00.08 00.04 MarkupToHTML end
16: 00.09 00.05 MarkupToHTML end
17: 00.09 00.05 MarkupToHTML begin
18: 00.10 00.06 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
19: 00.10 00.06 ReadApprovedUrls SiteAdmin.ApprovedUrls end
20: 00.11 00.07 MarkupToHTML end
21: 00.11 00.07 MarkupToHTML begin
22: 00.11 00.07 MarkupToHTML end
23: 00.12 00.07 now
Peak memory: 3,966,456 bytes