WebSite X5Help Center

 
Kev G.
Kev G.
User

Php include before html tag  en

Autor: Kev G.
Visited 781, Followers 1, Udostępniony 0  

Hi all,

Just a bit puzzled. I have some code that needs to be executed before the HTML tag. I have the code in a php file that I am trying to 'include'. Unfortunately this does not seem to work, but if I copy the actual code then it does work.

Can anyone explain why this should be please.

Thanks in advance, Kev Gray

Posted on the
6 ODPOWIEDZI - 1 PRAWIDłOWA ODPOWIEDź
Axel  
Axel  
User

Hello Kev,

Into you page properties you can add your code here

Axel

Czytaj więcej
Posted on the from Axel  
Kev G.
Kev G.
User
Autor

Hi Axel, thank yu for replying but your answer does not solve my question. I am asking why a 'php include' does not work, but the insertion of the code does.

See the attached, does not work. Another post to show what does work.

Thanks.

Czytaj więcej
Posted on the from Kev G.
Kev G.
Kev G.
User
Autor

This does work.

Czytaj więcej
Posted on the from Kev G.
Incomedia
Eric C.
Incomedia

Hello Kev,
where has the file been stored?

Eric

Czytaj więcej
Posted on the from Eric C.
Kev G.
Kev G.
User
Autor

The same folder as the web page.

Czytaj więcej
Posted on the from Kev G.
Axel  
Axel  
User

Hey Kev,

Your include does not works because your php file has not been exported on the web server.

I suggest this one.

- To export a personal file to the web server (Pdf, html, doc, php ...etc) you need to do that with an HTML object.
- Configure an HTML object into your page to prepare to export your php file like below

With the file explorer go to choose your incl_process_new_meber.php file into the field and for the directory I suggest to leave 'files'. Click OK

The PHP file will be ready for export into the 'files' directory on the web server... This directory will be automatically created during export.

So now into your php code into your project you need to add the path to find your PHP file on the web server like this.

It should be OK !smile

Axel

Czytaj więcej
Posted on the from Axel