0

[24-Dec-2011 04:05:07] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\inetpub\wwwroot\install\install.php on line 49

here is line's 48 thru 65

48                          $content = "<?php \n".
49			" \n".
50			"/* Database Host Name */ \n".
51			"\$db_host = '" . $post_details['db_host'] . "'; \n".
52			" \n".
53			"/* Database Username */ \n".
54			"\$db_username = '" . $post_details['db_username'] . "';   \n".			
55                           " \n".
56			"/* Database Login Password */ \n".
57			"\$db_password = '" . $post_details['db_password'] . "'; \n".
58			" \n".
59			"/* Database and Session prefixes */ \n".
60			"define('DB_PREFIX', '" . $post_details['table_prefix'] . "'); ## Do not edit ! \n".
61			"define('SESSION_PREFIX', 'probid_'); \n".
62			" \n".
63			"/* Database Name */ \n".
64			"\$db_name = '" . $post_details['db_name'] . "'; \n".
65			"?>";

I am going out of my mind trying to figure this one out

5
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by diafol
0

What do you want to achieve with saving a php block in a variable? If you call this variable you already have to be within <?php ?> tags?

0

I'm unclear on why you are using "." to end your statements instead of ";" but you might want to post lines 1-47, as php errors are often well before the line mentioned in the error message.

0

OK I get it - I think - you want to display php code in a page.

Use &lt; as opposed to < and &gt; instead of >

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.