can I place popup.php instead of popup.html on Google extension?
Thanks! I just downloaded a hello world sample file, and realised it's just a HTML and JS script.
Can I replace the popup.html by a popup.php and include 开发者_JAVA技巧PHP code?
thanks!
- No you can't . Why ? Because PHP will require a webserver or (php framework) to run . so .php file will not be run by chrome.
You can make it with iframe and remote popup.php ;]
here is my popup.php:
<html>
<head>
<title>Example Project</title>
</head>
<body>
<center><h1>Project: Example</h1>
<h3>Under Construction</h3>
<img src="<?= 'http://myvegaslimo.com/images/simpsons-under-construction.jpg' ?>" alt="under construction"></img></center>
</body>
</html>
and here is popup.html:
<iframe src="http://example.com/chrome-extension/Example/popup.php" width="640" height="580" style="border:none;"></iframe>
精彩评论