Php running error in linux!

Source: Internet
Author: User
Php running error in linux! -- Linux general technology-Linux technology and application information. For details, refer to the following section. Template_dir = STCMS_ROOT. "install/tpl"; $ smarty-> compile_dir = STCMS_ROOT. "install/cpl"; $ smarty-> switch ($ step) {case "1": $ smarty-> display ("install.html"); break; case "2 ": $ webUrl = str_replace ("\", "/", dirname ($ STCMS ['php _ SELF ']). "/"; $ smarty-> assign ("webUrl", $ webUrl); $ smarty-> display ("config.html"); break; case "3 ": if (empty ($ dbHost) die ("the Database Host cannot be blank! "); If (empty ($ dbUser) die (" the database username cannot be blank! "); If (empty ($ dbName) die (" the database name cannot be blank! "); If (empty ($ webUrl) die (" the website path cannot be blank! "); If (! $ Conn = @ mysql_connect ($ dbHost, $ dbUser, $ dbPwd) {die ("sorry, you cannot connect to the database server. Make sure that the database address, user name, and password are correct! ");} If (! @ Mysql_select_db ($ dbName, $ conn) {@ mysql_query ("create database '{$ dbName}'", $ conn);} if (! @ Mysql_select_db ($ dbName, $ conn) {die ("the database does not exist and cannot be created. Make sure that the database name is correct! ");} $ Content = file_get_contents (STCMS_ROOT. "config. inc. php "," r "); $ content = str_replace (" 'dbhost' => \ "{$ CONFIG ['dbhost']} \" ", "'dbhost' = >\" {$ dbHost} \" ", $ content ); $ content = str_replace ("'dbuser' => \" {$ CONFIG ['dbuser']} \ "", "'dbuser' = >\" {$ dbUser} \" ", $ content ); $ content = str_replace ("'dbpwd' => \" {$ CONFIG ['dbpwd']} \ "", "'dbpwd' = >\" {$ dbPwd} \" ", $ content ); $ content = str_replace ("'dbname' => \" {$ CONFIG ['dbname']} \ "", "'dbname' = >\" {$ dbName} \" ", $ content ); $ content = str_replace ("'dbprefix' => \" {$ CONFIG ['dbprefix']} \ "", "'dbprefix' = >\" {$ dbPrefix} \" ", $ content ); $ content = str_replace ("'weburl' = >\" {$ CONFIG ['weburl']} \" ", "'weburl' = >\" {$ webUrl} \" ", $ content); file_put_contents (STCMS_ROOT. "config. inc. php ", $ content); unset ($ content); echo" is set successfully. The database is being installed...
"; Require (INCLUDE_PATH. "mysql. class. php "); $ mysql = new mysql (); $ delimiter =" <{|}> "; $ dataPath = STCMS_ROOT. "install/data. SQL "; $ content = file_get_contents ($ dataPath); $ content = str_replace (" 'db _ PREFIX _ "," '{$ CONFIG ['dbprefix']} ", $ content); $ sqlArray = explode ($ delimiter, $ content); foreach ($ sqlArray as $ sqltmp) {if (trim ($ sqltmp )) $ mysql-> query ($ sqltmp);} echo "the database is successfully installed...
"; Echo" congratulations, STCMS has been installed successfully!
"; Echo" 5 seconds later transfer to the background... [the first time you log on to the background, the administrator username and password are admin] "; echo" "; Break ;}?> Error Parse error: syntax error, unexpected T_SWITCH, expecting T_STRING or T_VARIABLE or '{' or '$' in/home/www/music/install/index. php on line 19 I have never learned php. What is the error?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.