Pages

How to insert php code into the page? - Pages

How to insert php code into the page?

by rara » Sat Jun 01, 2019 5:20 pm

Hello,

Is there a way that I can integrate php code into it somehow.

The pages go as "mywebsite/app.php/custompage"
I can't find the custompage anywhere in my file manager to manually edit it. It seem's to be hidden or something.
rara
Registered User
Posts: 8
Joined: Tue May 28, 2019 9:23 pm
Contact:

Re: How to insert php code into the page?

by MattF » Sat Jun 01, 2019 5:28 pm

Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: How to insert php code into the page?

by rara » Sat Jun 01, 2019 6:10 pm

There is nothing there that answer's my question.
rara
Registered User
Posts: 8
Joined: Tue May 28, 2019 9:23 pm
Contact:

Re: How to insert php code into the page?

by Ozo » Sat Jun 01, 2019 7:59 pm

Without not really using this ext but just a wild stab; [How-To] Custom Page Templates + allowing PHP in templates from admin control panel options (not the extension)
Ozo
Registered User
Posts: 330
Joined: Mon Dec 13, 2010 7:57 pm
Contact:

Re: How to insert php code into the page?

by rara » Sat Jun 01, 2019 9:06 pm

Ozo wrote:Without not really using this ext but just a wild stab; [How-To] Custom Page Templates + allowing PHP in templates from admin control panel options (not the extension)
I don't really understand what you're trying to say here.
rara
Registered User
Posts: 8
Joined: Tue May 28, 2019 9:23 pm
Contact:

Re: How to insert php code into the page?

by yehors » Mon Jun 03, 2019 2:39 pm

Yes, you can use PHP code in templates.

First, enable the "Allow php in templates" option in the ACP > Security settings.
Second, put code like the following:

Code: Select all

Time: <!-- PHP --> echo time(); <!-- ENDPHP -->
But be careful, it is not good practice. The better way is to manually create a PHP page.
If you have a question, feel free to drop a message by PM or e-mail to me.
User avatar
yehors
Registered User
Posts: 32
Joined: Sat Jun 01, 2019 2:33 pm
Name: Yehor Smoliakov
Contact: