Q: Why is the php output div not displayed? PHPcode & lt ;? Phpif (! Isset ($ _ POST ['username']) {header (& quot; location: index. php & quot;) ;}if ask: why does php output div not display?
PHP code
". Mysql_errno (). "". mysql_error (); mysql_query ("set names '$ charset'"); mysql_select_db ($ db_name, $ link) or die ("unable to access database $ db_name "); $ SQL = "SELECT * FROM uc_members where username = '$ _ POST [username]'"; if (mysql_num_rows (mysql_query ($ SQL, $ link ))! = 0) error ("This account has been registered"); $ SQL = "INSERT INTO uc_members (bbsname, bbstype, name, username, password, email, regtime, regip, phone, idnumber, address, ps) VALUES ('$ _ POST [bbsname]', '$ _ POST [bbstype]', '$ _ POST [name]', '$ _ POST [username]', '". md5 ($ _ POST ['password']). "',' $ _ POST [email] ','". date ("Y-m-d H: I: s", time () + $ time_ctrl * 3600 ). "',' $ _ SERVER [REMOTE_ADDR] ',' $ _ POST [phone] ',' $ _ POST [idnumber] ',' $ _ POST [address] ', '')"; $ result = @ mysql_query ($ SQL, $ link) or die ("records cannot be added
". Mysql_errno (). "". mysql_error (); mysql_close ($ link); $ html = file_get_contents ("$ html_dir/reg_ OK .htm"); echo preg_replace ("/\ $([a-z0-9 \ _] +) /sie "," $ \ 1 ", $ html); $ username =$ _ POST ['username']; $ password =$ _ POST ['password']; $ name = $ _ POST ['name']; $ phone = $ _ POST ['phone']; $ idnumber = $ _ POST ['idnumber']; $ address = $ _ POST ['address']; $ email = $ _ POST ['email ']; $ copy = $ _ POST ['username']; $ countFile = 0; $ countDi R = 0; function copyDir ($ dirFrom, $ dirTo) {global $ countFile; global $ countDir; if (is_file ($ dirTo) {die ("Creation failed! ");} Elseif (is_dir ($ dirTo) {die (" This $ dirTo account has been applied for: Please go back to the previous page and enter your username again! ");} Elseif (! Is_dir ($ dirFrom) {die ("$ dirFrom does not exist! ");} Else {if (! Mkdir ($ dirTo) {die ("unknown error occurred, $ dirTo creation failed! There may be insufficient permissions! ") ;}$ CountDir ++;} $ handle = opendir ($ dirFrom); while ($ file_name = readdir ($ handle ))! = False) {$ file_path_from = $ dirFrom. DIRECTORY_SEPARATOR. $ file_name; $ file_path_to = $ dirTo. DIRECTORY_SEPARATOR. $ file_name; if ($ file_name! = "." & $ File_name! = "..") {If (is_dir ($ file_path_from) {copyDir ($ file_path_from, $ file_path_to);} else {if (! Copy ($ file_path_from, $ file_path_to) {unknown error occurs when die ("$ file_path_from, possibly with insufficient permissions! ") ;}$ CountFile ++ ;}} closedir ($ handle) ;}copydir (" client "," $ copy "); echo" created successfully: create $ countFile files! ";?>
Why cannot this section be displayed?
PHP code
Echo "created successfully: create $ countFile files! ";