phpheaderexpression-web

PHP Header doesn't work in web expressions 4


I am using header to redirect to a page:

ob_start();
header('Location: index.php');

It is working fine when i open the page directly from browser or any other editor. BUT it doesn't works when i open it through Microsoft expression web 4, which is my editor.


Solution

  • Try this:

    By default, Expression Web locates the php-cgi.exe file installed at C:\PHP or C:\Program Files\PHP. If you installed PHP in a different location, or if the text box under Path to PHP executable for previewing PHP pages in this website is empty, under Path to PHP executable for previewing PHP pages in this website, click Browse, locate and select php-cgi.exe, and then click OK.