WordPress.org

Ready to get started?Download WordPress

Forums

what is the current directory path? (4 posts)

  1. qwertyjjj
    Member
    Posted 3 years ago #

    I am using the exec-php plugin to run PHP code on my "Pages".
    I have uploaded a charting program called pCHart that uses code to include classes but it cannot find them.
    I tried the full relative path but even that isn;t weorking.
    What is the home path of the WordPress pages folder?

    Warning: Invalid argument supplied for foreach() in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts/pChart/pChart.class on line 3289

    // Standard inclusions
    include("pChart/pData.class");
    include("pChart/pChart.class");

  2. GRAQ
    Member
    Posted 3 years ago #

    Try something like:
    include( ABSPATH . 'Charts/pChart/pData.class" );

  3. qwertyjjj
    Member
    Posted 3 years ago #

    That seems like it's including the file but then a load of errors are thrown presumably because the class is programmed to look in a certain folder:

    Warning: Invalid argument supplied for foreach() in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts-pChart/pChart/pChart.class on line 3289

    These clasees work when access from mysite.net/Charts/example.php

    So, how can I get a wordpress page to run from that location? mysite.net/Charts/

  4. qwertyjjj
    Member
    Posted 3 years ago #

    When I do this:
    <?php

    // Standard inclusions
    include( ABSPATH . "Charts-pChart/pChart/example1.php");
    include( ABSPATH . "Charts-pChart/pChart/example1.png");
    ?>

    I get the error:
    Warning: Invalid argument supplied for foreach() in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts-pChart/pChart/pChart.class on line 3289

    Warning: max() [function.max]: Array must contain at least one element in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts-pChart/pChart/pChart.class on line 3300

    Warning: Invalid argument supplied for foreach() in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts-pChart/pChart/pChart.class on line 405

    Warning: Division by zero in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.net/Charts-pChart/pChart/pChart.class on line 466

    These clasees work when accessed directly from mysite.net/Charts/example.php

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.