Hi,
I try to load a php file into an Site Asset. But when I try to call this php script from a Standard Page, the server not recognize it as a php script, and it show me the file content like a txt file. There is any way to import .php scripts and run them form a MSM Site Assets?
Thanks
Marco
Matrix wont let you run your own PHP code like that. If we did, anyone with access to create an asset could elevate their privileges and do whatever they wanted.
The only way to run your own PHP code is to create a custom asset, or change the core code itself. Or you can host the PHP file elsewhere and use integration tools like Remote Content to bring it into your site.
Yes, Remote Content is going to be your friend here.
Depending on your requirements, you can also upload a .php file as a file asset, making sure it has public read and is live, and Apache will then serve that php file rather than Matrix and it will parse the php. Then, you could still use it in your nav or site how you normally would use a file asset.
[quote]
Depending on your requirements, you can also upload a .php file as a file asset, making sure it has public read and is live, and Apache will then serve that php file rather than Matrix and it will parse the php. Then, you could still use it in your nav or site how you normally would use a file asset.
[/quote]
Hey! that's a very good tip… Thumbs up
[quote]
Yes, Remote Content is going to be your friend here.
Depending on your requirements, you can also upload a .php file as a file asset, making sure it has public read and is live, and Apache will then serve that php file rather than Matrix and it will parse the php. Then, you could still use it in your nav or site how you normally would use a file asset.
[/quote]
This can depend on the apache settings. This is setting that turns off php for those files. We recommend having this setting for security reasons.
php_flag engine off
[quote]
Yes, Remote Content is going to be your friend here.
Depending on your requirements, you can also upload a .php file as a file asset, making sure it has public read and is live, and Apache will then serve that php file rather than Matrix and it will parse the php. Then, you could still use it in your nav or site how you normally would use a file asset.
[/quote]
Cool tip.
Did not know that. Tip of the month.
For my late thumb-up Nic! :lol: