WebSite X5Help Center

 
Gökhan Uçar
Gökhan Uçar
User

Cart/index.html, it is possible to do php convert  en

Автор: Gökhan Uçar
Просмотрено 10113, Подписчики 2, Размещенный 0  

Hi everybody

do all the pages in php  and ı try to cart/index.html,  I'm doing php from shopping cart features but it's happening again in html, do you have a different method. why would I want this, membership code available and this code does not work in html

<?php
$pa = new imPrivateArea();
$user = $pa->who_is_logged();
echo $user['realname'];
?>

Размещено
8 Ответы - 1 Полезно
John S.
John S.
User

The page has to be set as a PHP page before the code functions.

If the code is on a restricted page then the page should already be a php type.

Try a crtl+preview before uploading the site. Make a full upload.

Then empty the browsers cache so it will be the new page that is shown.

The code :

<?php
$pa = new imPrivateArea();
$user = $pa->who_is_logged();
echo $user['realname'];
?>

Should function - I have tested before I made the suggestion.

So - be sure the code is on a page with a type of PHP and be sure the project is uploaded ( the code has to be uploaded to the server ) - and be sure your browsers cache is cleared - then it should function.

You have to make a full upload as both the php files and the html files will be present and you have to be sure that eventual links is update so it will direct to the php-page and not the old html-page.

 

Читать больше
Размещено От John S.
John S.
John S.
User

You change the page-type in the settings for the page.

In the expert tab you choose php

Читать больше
Размещено От John S.
Gökhan Uçar
Gökhan Uçar
User
Автор

Thanks for your answer I did exactly that. I did like the picture above, shoping cart shows empty page when I do php

empty so, page background, all web design breaks down. 

Читать больше
Размещено От Gökhan Uçar
John S.
John S.
User

But - the pages where you put the codes should already be PHP - when you make them protected, the system automatically convert them to php.

Читать больше
Размещено От John S.
John S.
John S.
User

The code will not function in header or so.

If the shopping cart page  is made as a protected page, then it should function on that page.

Читать больше
Размещено От John S.
John S.
John S.
User

Maybe someone has some code that will function in the header.

The code should show something like "not logged in" if the user is not logged in - othervise it should show : Logged in as <name>

It would be really good if there was an object for this ( this was for INCOMEDIA ).

Читать больше
Размещено От John S.
John S.
John S.
User

If you use this code in a html-object :

<?php require_once("res/x5engine.php"); ?>
<?php
$pa = new imPrivateArea();
$user = $pa->who_is_logged();
echo $user['realname'];
?>

You can use it on a page that is not neccessarily a protected page - but it still has to be a php-page.

I am not sure if it will function in the header.

Читать больше
Размещено От John S.
John S.
John S.
User

Just tested : It will function in header,footer and sidebar as well, but then ALL the pages has to be php-pages.

It would have been a good thing that INCOMEDIA made the object.

Maybe someone has some smart code for this, where it is not needed to have all pages be of php type.

Читать больше
Размещено От John S.