Title: Embed PHP script in Page
Last modified: August 19, 2016

---

# Embed PHP script in Page

 *  [rleon](https://wordpress.org/support/users/rleon/)
 * (@rleon)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/embed-php-script-in-page/)
 * 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](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)

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/embed-php-script-in-page/#post-1203099)
 * 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](https://wordpress.org/support/users/rleon/)
 * (@rleon)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/embed-php-script-in-page/#post-1203313)
 * 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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [rleon](https://wordpress.org/support/users/rleon/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/embed-php-script-in-page/#post-1203313)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
