开发者

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!


  1. 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜