php - 使用include替换iframe php错误
问题描述
我正在尝试使用 include 替换我的 php 中的 iframe,但出现错误
include(/yii2cta/frontend/web/commenti/view?pc=71): failed to open stream: No error
我不想使用 ajax 或 jquery 加载,因为如果我在互联网上搜索后这样做,我的 javascript 代码会损坏,我发现我可以在包含和 file_get_contents 的 php 代码中使用 include 或“file_get_contents”错误我的代码是:
<?php
$url = Url::to(['/commenti/view', 'pc' => $model->post_id]);
include($url);
?>
网址是
/yii2cta/frontend/web/commenti/view?pc=71
如果我使用 iframe 它可以工作但我不想使用 iframe 但我不知道是否可以使用 include 或 file_get_contents ?
解决方案
推荐阅读
- javascript - 关键事件上的 event.preventDefault 在 Android 上的 Chrome 中不起作用
- c# - 使用异步/等待的彗星式 API 消耗
- java - 在 Java JSch Shell 中获得两次 shell 提示
- python - ExponentialDecay 位于具有嵌入权重的不同图中
- scala - Scala Map 上是否明确定义了 take 函数?
- spring - 过滤器(在 Spring Boot Web 应用程序中)能否根据所有定义的 RequestMapping 验证请求 URL?
- javascript - HTML文件中的Javascript不会输出变量
- r - 我无法在 R 中拼接降价,接收和错误;我该如何解决这个问题?更新:
- ruby-on-rails - ActiveAdmin 按嵌套关联排序
- c# - 记忆游戏 - 如何匹配不同的图像?