[Solved] What PHP Script will do this function: [closed]


You have 2 options

Fault: Your body of code below, caused a parse error and this is due to an unescaped quote in the word doesn't

  • Option 1:

Change this body of text/code:

echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head><title>401 Authorization Required</title></head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>';

to this: (while escaping the quotes "-//IETF//DTD HTML 2.0//EN") with \"

and using double quotes for your echo.

echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">
<html><head><title>401 Authorization Required</title></head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>";
  • Option 2:

Change doesn't to doesn\'t as per:

Eduardo Stuart’s answer which is also a solution, if not the best actually.

solved What PHP Script will do this function: [closed]