Reputation: 1397
I'm looking to create a Google Extension for Chrome. I was wondering if it is possible to include a PHP file in the extension. After reading about extensions on Google's developer portal, they only mentioned HTML, CSS, and JavaScript. Nevertheless, is it possible to use PHP in the extension? Help is greatly appreciated.
Upvotes: 0
Views: 327
Reputation: 476
The google extensions only support HTML, CSS and Javascript files and this is what is considered a client, while PHP is a server-side language.
You can find more about Google Extensions here https://developer.chrome.com/docs/extensions/mv3/architecture-overview/
Upvotes: 0
Reputation: 10338
No. Well, you can include a PHP file, but it won't be processed because PHP is run on a server. You can make a function in Javascript to contact a PHP script on your server, however.
Upvotes: 2
Reputation: 29985
No. PHP only runs on the server, while the extensions run in the browser. You can, of course, contact your server, but you can't run PHP inside the browser.
Upvotes: 3