Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fwrite to create new pw-protected php file

Status
Not open for further replies.

djtizzlemaster

Programmer
Mar 5, 2008
17
0
0
US
Based on troubleshooting I know that it is only this one line that is creating the problem. When I remove this line the page works fine.

Code:
$file_contents = "if (@$HTTP_SESSION_VARS['status'] <> 'login') {";

The error code I get is:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Any ideas? Thanks..
 
it will be trying to expand the variable inside the double quotes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top