HELP! PHP Parse error: syntax error, unexpected end of file in!!!

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • HELP! PHP Parse error: syntax error, unexpected end of file in!!!

    Hello, first of all, I'm very new to the html world. While I was looking to do some changes to my page I made a mistake and now I have this message: PHP Parse error: syntax error, unexpected end of file in line 6076. That line is the end of the code. Look a this.


    Code:
    function wp_privacy_delete_old_export_files() {
    `require_once( ABSPATH . 'wp-admin/includes/file.php' );`
    
    
    
    
    `$exports_dir = wp_privacy_exports_dir();`
    
    `$export_files = list_files( $exports_dir, 100, array( 'index.html' ) );`
    ​
    Code:
    `/**`
    
    `* Filters the lifetime, in seconds, of a personal data export file.`
    
    `*`
    
    `* By default, the lifetime is 3 days. Once the file reaches that age, it will automatically`
    
    `* be deleted by a cron job.`
    
    `*`
    
    `* @since 4.9.6`
    
    `*`
    
    `* @param int $expiration The expiration age of the export, in seconds.`
    
    `*/como se cierran las llaves html`
    
    `$expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS );`​
    Code:
    `foreach ( (array) $export_files as $export_file ) {`
    
    `$file_age_in_seconds = time() - filemtime( $export_file );`
    
    
    
    
    `if ( $expiration < $file_age_in_seconds ) {`
    
    `unlink( $export_file );`
    
    
    }
    ​
    I tried removing the '}' and nothing. I'm editing and reuploading to FileZilla but nothing. My page gives me error HTML 500.
    I don't know what's up with that '}' or if I need to add another one or what. Please help. Thanks in advance.​

  • #2
    Either one bracket too many open, or one bracket too few closed. But you can't tell exactly where with the source code sections.

    Kommentar

    Lädt...
    X