Support » Plugin: Code Widget » PHP code not executing

  • Resolved Phil Emery


    When the code

    <?php include( 'https://******/wp-content/themes/themename/doc-display.php' ) ; ?>

    The content of the file is not included

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sharaz Shahid


    Hi @noise,

    I think you’re using the include function wrong way. Include function work with file location path (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) not URL base path.
    For more information check the documention.

    let me know if your problem solved.

    Thread Starter Phil Emery


    Actually on the page referred:

    /* This example assumes that is configured to parse .php
    * files and not .txt files. Also, 'Works' here means that the variables
    * $foo and $bar are available within the included file. */
    // Won't work; file.txt wasn't handled by as PHP
    include '';
    // Won't work; looks for a file named 'file.php?foo=1&bar=2' on the
    // local filesystem.
    include 'file.php?foo=1&bar=2';
    // Works.
    include '';
    • This reply was modified 1 year, 5 months ago by Phil Emery.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP code not executing’ is closed to new replies.