Results 1 to 7 of 7

Thread: Adding rows to stat.html with data gathered by PHP script.

  1. #1
    Member
    Join Date
    Feb 2008
    Posts
    5

    Default Adding rows to stat.html with data gathered by PHP script.

    Hello, i'm working for a hosting company that uses cPanel, on creating a custom theme based on x3, and i would like to ask how can i do these changes.

    I want to add 2 rows, on the left site at stats (stat.html), the data will be gathered by php scripts. I just need when someone logins on his cpanel to see this data on the left side.

  2. #2
    Member
    Join Date
    Feb 2008
    Posts
    5

    Default

    I've added the rows from branding/index.html, but i can't include PHP files, they include but do not execute, is it possible to make those php files execute when they're included ?

    Thanks.

  3. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by bbhsoft View Post
    I've added the rows from branding/index.html, but i can't include PHP files, they include but do not execute, is it possible to make those php files execute when they're included ?

    Thanks.
    I believe if you rename branding/index.html to something like branding/index.cpphp (.cpphp executes API tags before PHP) or branding/index.phpcp (executes PHP before API tags) and update your /index.html file appropriately, the PHP will execute.

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    Default cp rename index file

    Quote Originally Posted by cPanelDavidG View Post
    I believe if you rename branding/index.html to something like branding/index.cpphp (.cpphp executes API tags before PHP) or branding/index.phpcp (executes PHP before API tags) and update your /index.html file appropriately, the PHP will execute.

    i am trying to rename file through file manager.when i rename it a new index.html file is created.will u help me resolve this problem

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    Quote Originally Posted by vinodwedhera View Post
    i am trying to rename file through file manager.when i rename it a new index.html file is created.will u help me resolve this problem
    I'll look into this later today. Feel welcome to email sales@cpanel.net if you need a faster response.

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default

    To insert PHP code into your index.html page and have it execute, I have done the following workaround:

    - Copy /usr/local/cpanel/base/frontend/x3/index.html to /usr/local/cpanel/base/frontend/x3/index.php

    On the server I am using, index.php takes precedence over index.html in the cPanel service (cpsrvd) that serves the cPanel interface pages. Since this is now an index.php page including your index.html page, any PHP code in the index.html page in the branding editor will be executed (no need to make that index.php as well).

    You can also use cpphp phpcp or livephp if you desire.

  7. #7
    Registered User
    Join Date
    Jul 2009
    Posts
    1

    Default

    I am not so knowledgeable about this matter. So i have to learn it. Thanks for the post.




    taux pret auto - taux pret auto differe selon la rise en compte ... calculent automatiquement le taux pour un prêt automobile donne.

Similar Threads

  1. want test script for html fetching data from xml file
    By its_joe in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 01-25-2009, 06:43 AM
  2. HTML form with lots of data submitted causing error
    By rogergraves in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 07-12-2005, 02:19 AM
  3. Help With php auction Script Please - Adding Fees
    By simplysites in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 07-20-2004, 03:55 AM
  4. adding php script to /scripts
    By christi1 in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 06-29-2004, 09:16 AM
  5. adding email accounts with php script
    By tundra96 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-15-2003, 05:48 PM