Results 1 to 6 of 6

Thread: How to insert some php code ?

  1. #1
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,075

    Default How to insert some php code ?

    Hello I need to insert some line of php code to show the date on my Cpanel skin html pages ....

    I tried in several way inserting this code on my html pages ..

    &cpanel include=&date.php&&

    or

    &!--#include virtual=&date.php& --&

    I tried to insert following php code in the html page

    &?php
    echo date(&F j, Y, g:i a&
    ?&

    but it doesn't work too .

    What I have to do to execute some php code inside my Cpanel skin html pages ?
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  2. #2
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    355

    Default

    Do you rename the file to .php ?
    if not... do it, or php code will not work

    Regards
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,075

    Default

    [quote:12bcca96e6][i:12bcca96e6]Originally posted by cass[/i:12bcca96e6]

    Do you rename the file to .php ?
    if not... do it, or php code will not work

    Regards[/quote:12bcca96e6]

    Yes absolutely , and I chmoded it 755 . I have problem also using cpanel tags inside php files . Do you have these problems ?
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

  4. #4
    Member
    Join Date
    Feb 2002
    Posts
    19

    Default

    There is a bug in the way CPanel sets up PHP. The PHP include path does not contain &.:&, so it is impossible to do:

    include ('file.php');

    You must use the absolute path to the included file

    I have submitted this as a bug in Bugzilla. Bug# 927.

  5. #5
    Member
    Join Date
    Feb 2002
    Posts
    19

    Default

    Ooops, a bit off topic
    Browsed the original post too quickly, while thinking of your PM, Radio_Head
    Anyway, this is still useful info

  6. #6
    Member This forum account has been confirmed by cPanel staff to represent a vendor. Radio_Head's Avatar
    Join Date
    Feb 2002
    Posts
    2,075

    Default

    [quote:86251cb6b5][i:86251cb6b5]Originally posted by qualitum[/i:86251cb6b5]

    Ooops, a bit off topic
    Browsed the original post too quickly, while thinking of your PM, Radio_Head
    Anyway, this is still useful info [/quote:86251cb6b5]

    Hello

    thank you , I was going mad .

    I tried

    header
    include
    fopen

    i receive always error

    For now I solved my problem using this

    echo &&meta http-equiv=\&REFRESH\& content=1;URL=http://www.$domain:2082/frontend/test/contact/saveemail.html?email=$email&&;

    (after passing domain hidden value on web form using the domain cpanel tag) .

    However I don't like a lot this solution because with javascript disabled it doesn't work . However thank you to have find the bug .

    Thanks !
    Stop SPAM & VIRUS :: ASSP Deluxe for cPanel http://www.grscripts.com
    █ ASSP Deluxe is supported by Fritz Borgstedt,ASSP main developer.

Similar Threads

  1. Replies: 5
    Last Post: 01-03-2012, 12:34 PM
  2. Replies: 0
    Last Post: 09-14-2010, 02:50 AM
  3. PHP code not interpreted
    By Constantin in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 04-10-2007, 11:50 AM
  4. PHP Code in WHM ?
    By cass in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 08-13-2002, 11:07 PM
  5. PHP code in cPanel
    By jameshsi in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 06-27-2002, 11:19 PM