• I am trying to redo a ticket broker website that I have in wordpress.
    I have 3rd party phpscripts but

    1. dont know where to put them in order for them to work.
    or
    dont understand where to put the code in order for it to work on the page.

    Here is the output of the script.

    http://test.rleon.net/php/ResultsTicket.php?evtid=1003529&event=New+York+Giants+Vs.+Washington+Redskins

    Now I would like to embed that in the page test.

    There are several scripts to generate the results. So I think they should all go somewhere within a wordpress directory.

    I have PHP Execution installed. And it works fine.

    I just cant seem to embed the phpscripts within the website test.rleon.net

Viewing 2 replies - 1 through 2 (of 2 total)
  • If the script is in my WordPress ‘root’ subfolder

    include(ABSPATH . 'myphp.php');

    And depending on where you want to put those scripts, there’s also other variables, in place of ABSPATH, that you can use.
    Examples:
    WP_CONTENT_DIR
    WPINC
    WP_PLUGIN_DIR
    STYLESHEETPATH
    TEMPLATEPATH

    If your code doesn’t require being in specifically named files, could also put the code in those scripts in your theme’s function.php if that’s of interest…

    Thread Starter rleon

    (@rleon)

    Maybe I am missing something but do i put

    include(ABSPATH . ‘ResultsTicket.php?evtid=1003529&event=New+York+Giants+Vs.+Washington+Redskins’);

    In the page?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Embed PHP script in Page’ is closed to new replies.