Support for PHP - File path to URL mapping

To be able to see the effects of a PHP script, it must be executed by the PHP interpreter. To do this, you need to view such a script not directly by reading it from your hard drive, but as a page sent by the server. Therefore, you need to set the file path mapping to the server address. You can do this in the project settings window (you need to set a separate mapping for each project).

Remember that in order to view the page, you must have an http server running. The most popular such server today is Apache(www.apache.org). This server must be hosting your site's documents.

It is possible to set more mappings for one project. This is useful when project elements are available not under one, but more addresses, e.g. in subdomains etc.

Example mapping

Let's assume that your project is located in a folder:
D:\my_projects\projectname1\

The server provides the project documents at the address:
https://127.0.0.1/projectname1

To be able to view executed PHP scripts from within the Spider window in the Review window, you must set the network mapping in the Project Properties window.

  • Name: Any mapping name
  • Mapped folder: \ (path relative to the site root)
  • To URL: https://127.0.0.1/project_name1

Online file editing

If you do not have a local http server running, you can edit files directly from the server by opening the file from the Servers tab.

To preview pages edited online, you must set the path mapping on the server to a URL. This is necessary so that Spider knows what address to direct the page display request to.

It is possible to set more mappings for one server. This is useful when project elements are available not under one, but more addresses, e.g. in subdomains etc.

Example mapping

Let's assume that your website is located on the server in a folder:
/www/public_html

The server provides the project documents at the address:
https://mydomain.pl/

In this case, create a mapping in the FTP Server Properties window under the Mapping Settings tab:

  • Name: Any mapping name
  • Mapped folder: /www/public_html
  • To URL: https://mydomain.pl/

Related topics

To top