Can you embed PHP in matrix


(Valeri Nikitin) #1

Hi Guys,


I think you may have answered this question before. But i'll ask again:



Can you use PHP within mysource matrix, i.e the parse file?



For example:


    <?php
    echo "Hello World"
    ?>

(Aleks Bochniak) #2

nerp…


(Valeri Nikitin) #3

what about perl?


(Greg Sherwood) #4

Matrix does not execute any embedded code. Only code capable of being executed client-side (e.g., JavaScript) can be embedded. All other functionality must be done using PHP plugins to Matrix.


(Valeri Nikitin) #5

Where can I get the PHP plugins to matrix?


(Avi Miller) #6

You have to write them. :)

(Aleks Bochniak) #7

Valerz, what are you trying to do?


(Valeri Nikitin) #8

trying to make a search tool within the website.


i have swish-e loaded on the box, and if I can't use PHP to call the command line, or Perl, I have no idea where to go from there.


(Avi Miller) #9

You would need to write a new asset type in PHP that connects to swish-e. Then, you would create an asset of that type within your Matrix system via the Admin Interface. I assume the new asset type would contain the PHP code that displays the search form and results.

There is a "Creating a new asset type" tutorial on the Matrix website.

(Valeri Nikitin) #10

[quote]You would need to write a new asset type in PHP that connects to swish-e. Then, you would create an asset of that type within your Matrix system via the Admin Interface. I assume the new asset type would contain the PHP code that displays the search form and results.


There is a “Creating a new asset type” tutorial on the Matrix website.[/quote]





Thanks Avi.