NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Newbie - Viewing PHP page in Design View


Joined: 01 Feb 2006
Posts: 2
Reply with quote
How would I look at /create a PHP page in view mode similar as to what can be done with an HTML page ?
Simply put, I need to creat a PHP page using design tools and then view it without opening it in a browser. I am using the downloaded trial version.
View user's profileFind all posts by kensafferSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
If I understand your question correctly, you are trying to execute php script - there is no other way to see how it looks in the browser. I appologise if I am telling you the things that you already know - I don't know how much you are familiar with PHP itself.
The easiest way to execute PHP script in PhpED is to:
- write the code using PhpED tools
- save the script with the name you prefer
- hit the Run button - in the toolbar, with green arrow.
PhpED server will start, execute the script and display resulting HTML in PhpED's output window.
You can also debug your script, for that you should select Run in Debugger button instead of Run.
Hope it helps
View user's profileFind all posts by yfaktorSend private message


Joined: 01 Feb 2006
Posts: 2
Reply with quote
Thank you fo rth ereply. How do I create a page, using design tools (example is Dreamweaver creating an HTML page) in PHPEd and the add the PHP code, run it and see what the page looks like ? Is there a way to creat the page
View user's profileFind all posts by kensafferSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
as far as HTML goes: while PhpED is not a true WYSIWYG editor, like Dreamweaver, it has plenty of tools helping you to create HTML tags - take a look at the buttons on the right side of the tool bar, they will launch various wizzards that will help you to define HTML forms, Links, selects - etc. The result will be generated HTML tags. PhpED also has inline html validator, which will check that your tags are well formed. HTML highliter will display your tags in different color. Once you created your HTML code, you can again hit Run button to see your html or php file displayed in the browser.However, I need to say this- PhpED is first of all the Integrated Development Environment for PHP. It supports javascript, html etc. but its main strength is PHP coding. It will help you the most with your php coding - function hints, variables hints, debugger, ftp deployment, project management - all of this good stuff.
Does it help?
View user's profileFind all posts by yfaktorSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think there is a kind of misunderstanding. Php is not a markup language like HTML. Believe it or not, with php you can not create pages at all. What you can do with it is character stream produced in the output. In most cases it is HTML stream and this stream goes to the browser and latter one shows it to the user.

Quote:
I need to creat a PHP page using design tools and then view it without opening it in a browser.

Php page? without a browser? No way.
With Dreamweaver can't do it either. It can never show you an HTML page without a browser.
Like PhpED, Dreamweaver has an embedded browser, but browser remains browser.
Even if you or somebody else "invent" a way to show php as page, this tool is nothing more but browser Smile

Now about php itself. It's a server side language. Server (http server like Apache) runs scripts written in php and returns their output to the client browser and latter one renders them. To make this loop shorter, PhpED comes with all things in one. It has an embedded browser and has http server too.

On the other hand, if you need a static HTML page like you can produce with Dreamweaver, you do not need php at all. Php comes when you need a dynamic page, a page with content that depends on or uses directly for example data stored in database. For example, this forum is written in php, keeps all the posts in database. But again, if you take a look at the pages sources in the browser you will find nothing more but HTML.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Newbie - Viewing PHP page in Design View
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic