The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP code in cPanel

Discussion in 'General Discussion' started by jameshsi, Jun 24, 2002.

  1. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    I am reading the document of WHM and Cpanel ,I notice one line:
    &You can use PHP code in cPanel themes. Example:

    $varible = '&cpanel print=&$CPDATA{'DNS'}&&';

    What is this means ? There is no php code in this example.
    Cpanel can use php code in theme ?
    If I want to let my clients submit a trouble ticket while they in the control panel, I want to pass some verible like domain,username,email to my ticketing system which is written by php, how should I do ?
     
  2. masood

    masood Well-Known Member

    Joined:
    Jun 14, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    The answer to your question is in your post :p

    before php code is run, your cpanel code above will be evaluated. thats a little un-documented secret ;)
     
  3. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Oh, I see.
    One more question,can I use .php file in cpanel theme ?
     
  4. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    see,

    Handler will first replace all variables in your php code ...
    then .php will run like what it is supposed to....
     
  5. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Oh, really ? So I can make a theme totally in php , right ?
     
  6. ehsan

    ehsan Well-Known Member

    Joined:
    Dec 11, 2001
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    you can run php under that port and with your cpanel theme
    give it a shot

    cd /usr/local/cpanel/base/frontend/default
    edit testphp.php

    &?PHP
    echo $REMOTE_ADDR;
    echo & TEST&;
    ?&


    you will see :)
     
  7. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Anyone using any dedicated server service in the cpanel.net list ?
    We are looking for a dedicated server with Cpanel solution, and don't know which one is provide good service.
     
  8. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:9e3d0ca937][i:9e3d0ca937]Originally posted by jameshsi[/i:9e3d0ca937]

    Anyone using any dedicated server service in the cpanel.net list ?
    We are looking for a dedicated server with Cpanel solution, and don't know which one is provide good service. [/quote:9e3d0ca937]
    this is not ads forum
     
  9. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    What do you mean ? You mean I can't ask people this kind of questions ?
    I just need some advice from people who has experience.
     
Loading...

Share This Page