- This topic is empty.
-
AuthorPosts
-
July 15, 2015 at 12:17 pm #205101jurotekParticipant
$config_file = preg_replace(“#\?>$#”, “”, $config_file); $config_file = trim($config_file);
July 15, 2015 at 12:39 pm #205105jurotekParticipantThanx Senff,
I just uploaded EE to server and my index.php was empty and I got that above error.Here is the whole code:
$config_file = preg_replace(“#\?>$#”, “”, $config_file); $config_file = trim($config_file);
// Add the new data string
$config_file .= $newline.$newline.$new_data.$newline;
// Add the closing PHP tag back
$config_file .= ‘?>’; } } if ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) { return FALSE; } flock($fp, LOCK_EX); fwrite($fp, $config_file, strlen($config_file)); flock($fp, LOCK_UN); fclose($fp); if ( ! empty($this->_config_path_errors)) { return $this->_config_path_errors; } else { return TRUE; } // <?php BBEdit bug fix
}July 15, 2015 at 12:50 pm #205107AlenParticipantPlease format the code properly. There could be some stripped code that we’re not seeing.
could be the curly quotes
That could be this forum jumbling stuff up because it’s not formatted correctly.
Use Markdown, use 3 ticks (`) then type php, then close it by another 3 ticks. So like this.
July 15, 2015 at 12:54 pm #205108jurotekParticipant“`php
<?php$config_file = preg_replace(“#\?>$#”, “”, $config_file); $config_file = trim($config_file); // Add the new data string $config_file .= $newline.$newline.$new_data.$newline; // Add the closing PHP tag back $config_file .= ‘?>’; } } if ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) { return FALSE; } flock($fp, LOCK_EX); fwrite($fp, $config_file, strlen($config_file)); flock($fp, LOCK_UN); fclose($fp); if ( ! empty($this->_config_path_errors)) { return $this->_config_path_errors; } else { return TRUE; } // <?php BBEdit bug fix
}
?>July 15, 2015 at 12:58 pm #205110jurotekParticipant<?php $config_file = preg_replace("#\?>$#", "", $config_file); $config_file = trim($config_file); // Add the new data string $config_file .= $newline.$newline.$new_data.$newline; // Add the closing PHP tag back $config_file .= '?>'; } } if ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE)) { return FALSE; } flock($fp, LOCK_EX); fwrite($fp, $config_file, strlen($config_file)); flock($fp, LOCK_UN); fclose($fp); if ( ! empty($this->_config_path_errors)) { return $this->_config_path_errors; } else { return TRUE; } // <?php BBEdit bug fix } ?>
July 15, 2015 at 1:20 pm #205112AlenParticipant<?php $config_file = preg_replace("#\?>$#", "", $config_file); $config_file = trim($config_file); // Add the new data string $config_file .= $newline.$newline.$new_data.$newline; // Add the closing PHP tag back $config_file .= '?>'; } // <-- ERROR } // <-- ERROR if ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE) ) { return FALSE; } flock($fp, LOCK_EX); fwrite($fp, $config_file, strlen($config_file)); flock($fp, LOCK_UN); fclose($fp); if ( ! empty($this->_config_path_errors) ) { return $this->_config_path_errors; } else { return TRUE; } // <?php BBEdit bug fix } // <-- ERROR
July 15, 2015 at 1:30 pm #205113jurotekParticipantPerfect. Thank you Alen!
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.