Untitled 1

Php in design view

Gray Pipe

This forum is now closed. Thank you for your contributions. If you need more information about where else you can find help, you can visit the resource page.

Answered by:

Question

I have EW3 SP2. I do not have version 4 yet as we have volume licensing and we are waiting on our vendor. I saw the post on EW3 and PHP that dealt with DWT or Dynamic Web Template. I am looking for design view with PHP (which as I understand it is entirely different). When I edit an HTML page I have the designview as an option. This is handy mainly for very large tables. For regular html or php I do and prefer hand writting. So I have some large tables (with table appropriate data) that I would like to manage in design view though. However when I edit a php page, all I get is code view. This is ok in one respect as I can go in and find what I need, it is simply quite a bit more tedious.

Answers

Without seeing your page, I can’t say any more. The general rule remains the same: You do have Design View for a php page. If it’s HTML on the page, it will show in Design View, while stuff requirig PHP processing won’t. If it looks like everything is processed with PHP, nothing will show in Design View — but the option is still there. If I create a page called dummy.php, and strip out *everything* (no doctype, no , no in the page:

Just a div, nothing else.

You still have Design View. If I strip out everything and put just a PHP script in the page, no other HTML at all: Hello World

Читайте также:  Телеграмм бот python клавиатуры

‘; ?> You still have Design View (although it shows nothing, of course). I can’t come up with a scenario where opening a PHP page doesn’t give you the option of Design View. [Well, unless you’ve configured your editors (under Tools -> Application Options) to open it as a text file. You haven’t done that, have you?]

All replies

I just use the development server de jour. in my case wamp. I am finding more and more that design view is a waste of time and that it does more to confuse folks than anything else. Using the server you truthfully see what everyone else is going to see and what could be better than that? IMHO, MIKE E «It’s like déjà vu all over again.» — Yogi Berra

You do have Design View as an option with a PHP page. Of course, it can only show you the HTML that doesn’t have to first be processed by the server to be generated. Design View isn’t a browser, and it’s not running a server.

  • Proposed as answer by ebermed Wednesday, July 7, 2010 4:53 AM
  • Marked as answer by Paul Bartholomew, Moderator Wednesday, July 7, 2010 5:41 PM
  • Unmarked as answer by GWGorham Thursday, July 8, 2010 5:25 PM
  • Unproposed as answer by GWGorham Thursday, July 8, 2010 5:25 PM

If you have an HTML page and you simply change the file extension to .php, it will preview in design view just fine. If you add code that does not require server resources (as Kathy mentioned), you can preview locally with a browser through either WAMP or the Expression Web Development Server (which browser preview will automatically invoke if you have the proper EW setting). If you are using a database and have it running locally, you should be able to preview locally just fine with WAMP or EWDS. Will
Baltimore, MD USA — www.fastie.com

Ok so I am using php for the includes for the header and footer. In esssence there is only the html of the table on the page and that does not get picked up by EW. So if I read some other threads right then what I need to do is put the proper declarations at the top and resave it as an html to use design view? I understand EW is not a server and will not process php. But I think I understand that better now. Am I getting it right? I don’t want super preview mode, don’t care about it. I know what it will look like. The design view is handy for existing tables (which were designed before I took over the intranet, I generally tend to shy away from tables if at all possible simply because they are a pain in the butt) and necessary for boss.

Design View will not open/load the php includes even if those includes are all html. Dream Weaver will do that — just saying. It’s not rocket science, so I just wish that EW would get that feature put in. It’s one of the reasons I seldom use design view. Now that publishing is so easy in EW 4 with «Ctrl + Shift + U» I pretty much stick to the production server and a browser to view my pages. What is irritating is that lacking the header information present in those includes, EW flags all sorts of errors with the cursed underlined in squiggly red. However you can, in the configuration, tell EW what !DOCTYPE to use as a default and that eases a some of the EW flotsam and jetsom. This EW problem has pushed me to a completely different php master page architecture. I load the same file always, and populate sections based on the url include.
As in: http://mysite.com/index.php?content=scarlettjohansson Here the content is loaded according to a switch($_GET[‘content’]) < yahda yahda yahda >EW works pretty well under this regime and the architecture is very easy to use, extend and maintain. Like a DWT but better.

«So if I read some other threads right then what I need to do is put the proper declarations at the top and resave it as an html to use design view?» You don’t need to change the extension to .html. Design View will show you the HTML in a .php page as long as that HTML is already in the page, not waiting to be put there by PHP processing. E.g.: In EW, create a new PHP page (File -> New -> PHP). You’ll get:

      
PHP is going to say Hello to you:
Hello World

'; ?>
PHP is going to say Hello to you:

That’s the HTML in the page that is not generated by PHP. A browser preview will show all of the HTML, including the PHP generated section, of course:

PHP is going to say Hello to you: Hello World

Источник

Php in design view

This forum is now closed. Thank you for your contributions. If you need more information about where else you can find help, you can visit the resource page.

Visual studio home link

Answered by:

Question

I have EW3 SP2. I do not have version 4 yet as we have volume licensing and we are waiting on our vendor. I saw the post on EW3 and PHP that dealt with DWT or Dynamic Web Template. I am looking for design view with PHP (which as I understand it is entirely different). When I edit an HTML page I have the designview as an option. This is handy mainly for very large tables. For regular html or php I do and prefer hand writting. So I have some large tables (with table appropriate data) that I would like to manage in design view though. However when I edit a php page, all I get is code view. This is ok in one respect as I can go in and find what I need, it is simply quite a bit more tedious.

Answers

Without seeing your page, I can’t say any more. The general rule remains the same: You do have Design View for a php page. If it’s HTML on the page, it will show in Design View, while stuff requirig PHP processing won’t. If it looks like everything is processed with PHP, nothing will show in Design View — but the option is still there. If I create a page called dummy.php, and strip out *everything* (no doctype, no , no in the page:

Just a div, nothing else.

You still have Design View. If I strip out everything and put just a PHP script in the page, no other HTML at all: Hello World

‘; ?> You still have Design View (although it shows nothing, of course). I can’t come up with a scenario where opening a PHP page doesn’t give you the option of Design View. [Well, unless you’ve configured your editors (under Tools -> Application Options) to open it as a text file. You haven’t done that, have you?]

All replies

I just use the development server de jour. in my case wamp. I am finding more and more that design view is a waste of time and that it does more to confuse folks than anything else. Using the server you truthfully see what everyone else is going to see and what could be better than that? IMHO, MIKE E «It’s like déjà vu all over again.» — Yogi Berra

You do have Design View as an option with a PHP page. Of course, it can only show you the HTML that doesn’t have to first be processed by the server to be generated. Design View isn’t a browser, and it’s not running a server.

  • Proposed as answer by ebermed Wednesday, July 7, 2010 4:53 AM
  • Marked as answer by Paul Bartholomew, Moderator Wednesday, July 7, 2010 5:41 PM
  • Unmarked as answer by GWGorham Thursday, July 8, 2010 5:25 PM
  • Unproposed as answer by GWGorham Thursday, July 8, 2010 5:25 PM

If you have an HTML page and you simply change the file extension to .php, it will preview in design view just fine. If you add code that does not require server resources (as Kathy mentioned), you can preview locally with a browser through either WAMP or the Expression Web Development Server (which browser preview will automatically invoke if you have the proper EW setting). If you are using a database and have it running locally, you should be able to preview locally just fine with WAMP or EWDS. Will
Baltimore, MD USA — www.fastie.com

Ok so I am using php for the includes for the header and footer. In esssence there is only the html of the table on the page and that does not get picked up by EW. So if I read some other threads right then what I need to do is put the proper declarations at the top and resave it as an html to use design view? I understand EW is not a server and will not process php. But I think I understand that better now. Am I getting it right? I don’t want super preview mode, don’t care about it. I know what it will look like. The design view is handy for existing tables (which were designed before I took over the intranet, I generally tend to shy away from tables if at all possible simply because they are a pain in the butt) and necessary for boss.

Design View will not open/load the php includes even if those includes are all html. Dream Weaver will do that — just saying. It’s not rocket science, so I just wish that EW would get that feature put in. It’s one of the reasons I seldom use design view. Now that publishing is so easy in EW 4 with «Ctrl + Shift + U» I pretty much stick to the production server and a browser to view my pages. What is irritating is that lacking the header information present in those includes, EW flags all sorts of errors with the cursed underlined in squiggly red. However you can, in the configuration, tell EW what !DOCTYPE to use as a default and that eases a some of the EW flotsam and jetsom. This EW problem has pushed me to a completely different php master page architecture. I load the same file always, and populate sections based on the url include.
As in: http://mysite.com/index.php?content=scarlettjohansson Here the content is loaded according to a switch($_GET[‘content’]) < yahda yahda yahda >EW works pretty well under this regime and the architecture is very easy to use, extend and maintain. Like a DWT but better.

«So if I read some other threads right then what I need to do is put the proper declarations at the top and resave it as an html to use design view?» You don’t need to change the extension to .html. Design View will show you the HTML in a .php page as long as that HTML is already in the page, not waiting to be put there by PHP processing. E.g.: In EW, create a new PHP page (File -> New -> PHP). You’ll get:

      
PHP is going to say Hello to you:
Hello World

'; ?>
PHP is going to say Hello to you:

That’s the HTML in the page that is not generated by PHP. A browser preview will show all of the HTML, including the PHP generated section, of course:

PHP is going to say Hello to you: Hello World

Источник

Оцените статью