Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
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 ?
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[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 ?
 

qualitum

Member
Feb 17, 2002
19
0
301
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.
 

qualitum

Member
Feb 17, 2002
19
0
301
Ooops, a bit off topic :)
Browsed the original post too quickly, while thinking of your PM, Radio_Head :)
Anyway, this is still useful info ;)
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[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 !