在设计视图中预览PHP代码 [英] Previewing PHP code in Design View

查看:82
本文介绍了在设计视图中预览PHP代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本周末刚刚下载了EW3并修补了一些PHP教程。我正在使用拆分视图来帮助我在编写代码时可视化代码呈现。我能够使用预览(F12)在本地浏览器中查看PHP代码渲染,想知道为什么我只能在设计视图中看到HTML而不是我的PHP代码。我只在设计视图中看到一个脚本图标...而不是我在浏览器中看到它的呈现方式。认为它应该至少在设计视图中可见......有人请让我知道。谢谢,

Jason

Just downloaded EW3 this weekend and tinkering through some PHP tutorials.  I am using the split view to help me visualize code rendering as I write the code.  I am able to view PHP code rendering in browsers locally using the preview (F12), wondering why I can only see HTML in the design view and not my php code.  I only see a script icon  in Design View...not how I see it rendered in a browser.  Thinking it should be at least viewable in the design view...someone please let me know.  Thanks,

Jason

推荐答案

Design View不是浏览器。可以把它想象成一个草图板,它可以完成许多浏览器无法做到的事情(使用Visual Aids和其他所有导航功能)。视觉辅助工具单独阻止它像浏览器那样准确地呈现页面,因为浏览器没有占用视口中占用空间的所有图形内容。

设计窗格不运行基于服务器的代码或脚本,因为它没有连接到一个。它只是一个信息量很大的界面。

您必须经常在浏览器中预览 - 并且在多个浏览器中。设计窗格永远不会像真正的浏览器一样工作,因为有很多不同的浏览器由很多不同的渲染引擎驱动。
Design View isn't a browser. Think of it more as a sketch pad that does lots of stuff a browser can't do (with Visual Aids and all the other navigation stuff it does). The visual aids alone prevent it from rendering the page as accurately as a browser since the browser doesn't have all that graphical stuff taking up space in the viewport.

The Design Pane doesn't run server-based code or scripts, 'cause it's not connected to one. It's just a very information-heavy interface.

You have to preview often in a browser--and, in multiple browsers. The Design Pane could never work like a real browser since there are so many different browsers driven by so many different rendering engines.


这篇关于在设计视图中预览PHP代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆