Forums

WordPress Includes (5 posts)

  1. maryandpaul
    Member
    Posted 3 years ago #

    I've placed some HTML code in one of my WordPress pages which calls a PHP which I have written. I placed the PHP in the WordPress Includes directory. When the HTML calls the PHP I get an error messsage that the PHP cannot be found.

  2. stvwlf
    Member
    Posted 3 years ago #

    Your own PHP should not go in to wp-includes folder but in wp-content. That is the only folder user content is intended to be under. The best place to put it is in your theme's folder, or a subfolder in the theme's folder.

    That may not be the problem however. Includes need a file path that starts from the server root of your hosting account, not a URL. Post the line of code you used to include the file. Also post the error message.

  3. maryandpaul
    Member
    Posted 3 years ago #

    HTML CODE IN PAGE -
    <html>
    <body>
    <form action="processorder2.php" method="post">
    etc
    etc

    THE FILE PROCESSORDER2.PHP PLACED IN THE THEME DIRECTORY OF THE WP-CONTENT FOLDER.

    ERROR MESSAGE RECEIVED -

    Page Not Found

    The page you tried to access does not exist on this server. This page may not exist due to the following reasons:

    You are the owner of this web site and you have not uploaded (or incorrectly uploaded) your web site. For information on uploading your web site using FTP client software or web design software, click here for FTP Upload Information.

    The URL that you have entered in your browser is incorrect. Please re-enter the URL and try again.

    The Link that you clicked on incorrectly points to this page. Please contact the owner of this web site to inform them of this situation.

  4. whooami
    Member
    Posted 3 years ago #

    <form action="processorder2.php" method="post">

    thats not an include, and in the case of files that you are sending $_POST requests to, they ought to be located in your wordpress root.

    Also, why are you bolding things? We all do ok with normal type around here.

  5. stvwlf
    Member
    Posted 3 years ago #

    And if you don't want it in the wordpress root, you need an absolute path to where processorder2.php is located, not just the name of the file

    for example - if your wp root is http://mydomain.com/wordpress/...

    action="/wordpress/wp-content/themes/my-theme/processorder2.php"

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.