📜 ⬆️ ⬇️

PHP support in Expression Web 3

image PHP is one of the important web technologies and we implemented PHP support in Expression Web. With Expression Web 3, you can create PHP pages, embed PHP code in HTML pages, or combine both methods.

Expression Web 3 supports PHP syntax highlighting, Intellisense, inserting PHP snippets, connecting PHP files, viewing PHP pages with an embedded development server. And if you have IIS6 or IIS7, you can enable FastCGI for better PHP performance.


Docking PHP Interpreter
')
Before you start writing any PHP code, make sure that the path to the PHP interpreter is set in the Expression Web settings.
  1. Go to Tools-> Applications Options
  2. Specify the path to the interpreter

image

Creating PHP pages
  1. Go to the menu File-> New-> PHP
  2. Write in body

< HTML >
< HEAD ></ HEAD >
< BODY >
<? php echo ( "Hello World" ) ? >
</ BODY >
</ HTML >


View PHP pages in the embedded web server

To test your PHP pages, you need to have a web server, local or remote. Lack of use of a remote server - the time of uploading changes to the server itself, to view the result. Local servers, such as Apache or IIS, can cause problems with correct configuration.

Expression Web 3 includes a web server that you can use to view PHP and ASP.NET pages. To use the embedded server, you need to specify the path to the PHP interpreter in the Expression settings.

But the real power of the Expression Web development server is in using different browsers to view the result, as well as the ability to view the result at different screen resolutions.

image

Connecting PHP files

Expression Web supports connecting PHP files to combine simple elements across multiple pages.
<? php include (' Name_of_include_file . php '); ? >


Even if the plug-in elements are in different files, Expression Web will display their contents in Design View.

IntelliSense for PHP

Wherever you are in the code, IntelliSense will always help you. For example, show a list of properties or attributes, methods or events. IntelliSense is especially useful for the built-in PHP functions, it will show the list of required parameters, with their corresponding types.

image

PHP snippets

PHP snippets are simple blocks of ready-made PHP code that can be inserted through the Insert-> PHP menu, and then choose a snippet to add. For example, Expression Web can insert PHP incude, as shown above, if you select this action in the menu from the Insert menu, and then select the file you want to connect.

Source: https://habr.com/ru/post/73381/


All Articles