(HELPPP...!!) PHP error setelah upload ke hosting

Saya baru upload wweb saya yang di bikin dari wordpress tapi setelah saya upload ada error code seperti ini

 Parse error: syntax error, unexpected $end in /home4/lokcay02/public_html/sossafetyacademy.com/wp-content/themes/fitness/framework/color.php on line 1

ada yang bisa bantu7 thanks

avatar Aziez
@Aziez

193 Kontribusi 18 Poin

Diperbarui 7 tahun yang lalu

6 Jawaban:

Itu dilihat di file color.php line 1. Errornya dari situ.

avatar rachmatsasongko
@rachmatsasongko

410 Kontribusi 426 Poin

Dipost 7 tahun yang lalu

 <?phpadd_action('wp_head', 'fitness_dynamic_css');if ( !function_exists( 'fitness_dynamic_css' ) ) {		function fitness_dynamic_css() {				function hex2rgb($hex) {   $hex = str_replace("#", "", $hex);   if(strlen($hex) == 3) {      $r = hexdec(substr($hex,0,1).substr($hex,0,1));      $g = hexdec(substr($hex,1,1).substr($hex,1,1));      $b = hexdec(substr($hex,2,1).substr($hex,2,1));   } else {      $r = hexdec(substr($hex,0,2));      $g = hexdec(substr($hex,2,2));      $b = hexdec(substr($hex,4,2));   }   $rgb = array($r, $g, $b);   //return implode(",", $rgb); // returns the rgb values separated by commas   return $rgb; // returns an array with the rgb values}$fitness_option = fitness_global();  $b=$fitness_option['main-color'];$rgba = hex2rgb($b); 		//$fitness_option = fitness_global();  			$custom_css ='';				$rgb0 = esc_attr( $rgba[0]);		$rgb1 = esc_attr( $rgba[1]);		$rgb2 = esc_attr( $rgba[2]);		$all_bg = esc_url($fitness_option['bg_allpage']['url']);		$main_color = esc_attr($fitness_option['main-color']);		$menu_bg = esc_attr($fitness_option['menu_background']);		$btn_color = esc_attr($fitness_option['btn-color']);		$header_bg = esc_attr($fitness_option['background_header']);		$header_scroll_bg = esc_attr($fitness_option['background_header_scroll']);		$header_color=esc_attr($fitness_option['color_header']);		$footer_bg = esc_attr($fitness_option['background_footer']);		$footer_color = esc_attr($fitness_option['color_footer']);		$custom_css .= ".person .img:before {	background-color: rgba($rgb0, $rgb1; ,$rgb2, 0.8);}.menu ul li a{	color:$header_color;	}.rich-header{	background-image:url($all_bg);}.progress-bar .line,.person .title:after,.pricing-table > .column > .title,i.circle,i.square,.i-separator i,#top:hover,.slider:hover .slider-nav:hover,.owl-theme .owl-controls .owl-page.active span,.owl-theme .owl-controls.clickable .owl-page:hover span,.ui-tabs ul li.ui-state-default.ui-tabs-active.ui-state-active,.vc_toggle.vc_toggle_active .vc_toggle_title{	background-color:$main_color;}ul.clearfix li a.mPS2id-highlight.mPS2id-highlight-first,ul.clearfix li.active.menu-item-object-page > a, .menu ul li a:hover,.menu ul li a.current{	background-color:$menu_bg;}.accordion .toggle-title.ui-accordion-header-active{	background-color:$main_color !important;}.title, .title-light,.tab.active,.content-box > .box .box-icon,.content-box > .boxes .box-icon,.counter .count,.counter .counts,.person .name,.text-separator,.blog-list a,i[class*=' icon-'],i[class^=icon-],.t-separator,.person .social-links a,.rich-header h1,.pattern h1,body[data-skin='dark'] .blog-list h3.blog-title a:hover,.blog-list h3.blog-title a:hover,.sidebar .widget li a:hover, .tagcloud a:hover, .sidebar .widget li.recentcomments a,body[data-skin='dark'] .sidebar .widget li.recentcomments a,.box .box-title,.boxes .box-title,body[data-skin='dark'] .sidebar .widget li a:hover{	color:$main_color;}::-moz-selection,::selection {	color:$main_color;}.button, .vc_button, .vc_button.medium,  .comment-form .form-submit input[type='submit'], .submit, button, .read-more, .comment-body a.comment-reply-link,input[type='reset'],input[type='submit'],input[type='button'],.tabset .tab.active,.accordion .toggle-title.active{	background-color: $btn_color;}.button2,.button2.large,.button2.small,.button2.medium,.pagination ul li span, .pagination ul li a:hover{	border-color: $main_color;	color:$main_color!important;}.button3,.button3.large,.button3.small,.button3.medium,.pagination ul li span, .pagination ul li a:hover{	border-color: $main_color;	color:$main_color!important;}.tagcloud a:hover,body[data-skin='dark'] .tagcloud a:hover,.blog-link a{	color: $main_color!important;	border: 1px solid $main_color;}.i-separator:after,.i-separator:before,.t-separator:after,.t-separator:before {	background: -moz-linear-gradient(right,  $main_color 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);	background: -webkit-linear-gradient(right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -o-linear-gradient(right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -ms-linear-gradient(right, $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: linear-gradient(to left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);}.i-separator:after,.t-separator:after {	background: -moz-linear-gradient(left,  $main_color 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);	background: -webkit-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -o-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -ms-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: linear-gradient(to right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);}.header{	background-color:$header_bg;	}.header.active.fixed{	background-color:$header_scroll_bg;}.header ul li a{	}footer#footer{	background-color:$footer_bg;	color:$footer_color;}";// Remove white space		$custom_css =  preg_replace( '/\s+/', ' ', $custom_css );				// output css on front end		$css_output = "<style type=\"text/css\">\n" . $custom_css . "\n</style>";		if( !empty($custom_css) ) {			echo $css_output; // No need to escape		}};};?>

perasaan sama deh gan

avatar Aziez
@Aziez

193 Kontribusi 18 Poin

Dipost 7 tahun yang lalu

kode diatas syntaxnya error, curly bracket penutupnya hilang. sebenernya ada tapi karena itu script diminified jadi 1 line, ada komen yang bikin scriptnya kepotong

yang kebaca cuma

<?phpadd_action('wp_head', 'fitness_dynamic_css');if ( !function_exists( 'fitness_dynamic_css' ) ) {		function fitness_dynamic_css() {				function hex2rgb($hex) {   $hex = str_replace("#", "", $hex);   if(strlen($hex) == 3) {      $r = hexdec(substr($hex,0,1).substr($hex,0,1));      $g = hexdec(substr($hex,1,1).substr($hex,1,1));      $b = hexdec(substr($hex,2,1).substr($hex,2,1));   } else {      $r = hexdec(substr($hex,0,2));      $g = hexdec(substr($hex,2,2));      $b = hexdec(substr($hex,4,2));   }   $rgb = array($r, $g, $b);

setelah itu ada comment // yang bikin sisa scriptnya dianggap komen semua

//return implode(",", $rgb); // returns the rgb values separated by commas   return $rgb; // returns an array with the rgb values}$fitness_option = fitness_global();  $b=$fitness_option['main-color'];$rgba = hex2rgb($b); 		//$fitness_option = fitness_global();  			$custom_css ='';				$rgb0 = esc_attr( $rgba[0]);		$rgb1 = esc_attr( $rgba[1]);		$rgb2 = esc_attr( $rgba[2]);		$all_bg = esc_url($fitness_option['bg_allpage']['url']);		$main_color = esc_attr($fitness_option['main-color']);		$menu_bg = esc_attr($fitness_option['menu_background']);		$btn_color = esc_attr($fitness_option['btn-color']);		$header_bg = esc_attr($fitness_option['background_header']);		$header_scroll_bg = esc_attr($fitness_option['background_header_scroll']);		$header_color=esc_attr($fitness_option['color_header']);		$footer_bg = esc_attr($fitness_option['background_footer']);		$footer_color = esc_attr($fitness_option['color_footer']);		$custom_css .= ".person .img:before {	background-color: rgba($rgb0, $rgb1; ,$rgb2, 0.8);}.menu ul li a{	color:$header_color;	}.rich-header{	background-image:url($all_bg);}.progress-bar .line,.person .title:after,.pricing-table > .column > .title,i.circle,i.square,.i-separator i,#top:hover,.slider:hover .slider-nav:hover,.owl-theme .owl-controls .owl-page.active span,.owl-theme .owl-controls.clickable .owl-page:hover span,.ui-tabs ul li.ui-state-default.ui-tabs-active.ui-state-active,.vc_toggle.vc_toggle_active .vc_toggle_title{	background-color:$main_color;}ul.clearfix li a.mPS2id-highlight.mPS2id-highlight-first,ul.clearfix li.active.menu-item-object-page > a, .menu ul li a:hover,.menu ul li a.current{	background-color:$menu_bg;}.accordion .toggle-title.ui-accordion-header-active{	background-color:$main_color !important;}.title, .title-light,.tab.active,.content-box > .box .box-icon,.content-box > .boxes .box-icon,.counter .count,.counter .counts,.person .name,.text-separator,.blog-list a,i[class*=' icon-'],i[class^=icon-],.t-separator,.person .social-links a,.rich-header h1,.pattern h1,body[data-skin='dark'] .blog-list h3.blog-title a:hover,.blog-list h3.blog-title a:hover,.sidebar .widget li a:hover, .tagcloud a:hover, .sidebar .widget li.recentcomments a,body[data-skin='dark'] .sidebar .widget li.recentcomments a,.box .box-title,.boxes .box-title,body[data-skin='dark'] .sidebar .widget li a:hover{	color:$main_color;}::-moz-selection,::selection {	color:$main_color;}.button, .vc_button, .vc_button.medium,  .comment-form .form-submit input[type='submit'], .submit, button, .read-more, .comment-body a.comment-reply-link,input[type='reset'],input[type='submit'],input[type='button'],.tabset .tab.active,.accordion .toggle-title.active{	background-color: $btn_color;}.button2,.button2.large,.button2.small,.button2.medium,.pagination ul li span, .pagination ul li a:hover{	border-color: $main_color;	color:$main_color!important;}.button3,.button3.large,.button3.small,.button3.medium,.pagination ul li span, .pagination ul li a:hover{	border-color: $main_color;	color:$main_color!important;}.tagcloud a:hover,body[data-skin='dark'] .tagcloud a:hover,.blog-link a{	color: $main_color!important;	border: 1px solid $main_color;}.i-separator:after,.i-separator:before,.t-separator:after,.t-separator:before {	background: -moz-linear-gradient(right,  $main_color 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);	background: -webkit-linear-gradient(right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -o-linear-gradient(right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -ms-linear-gradient(right, $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: linear-gradient(to left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);}.i-separator:after,.t-separator:after {	background: -moz-linear-gradient(left,  $main_color 0%, rgba(240,162,83,0) 90%, rgba(255,255,255,0) 100%);	background: -webkit-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -o-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: -ms-linear-gradient(left,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);	background: linear-gradient(to right,  $main_color 0%,rgba(240,162,83,0) 90%,rgba(255,255,255,0) 100%);}.header{	background-color:$header_bg;	}.header.active.fixed{	background-color:$header_scroll_bg;}.header ul li a{	}footer#footer{	background-color:$footer_bg;	color:$footer_color;}";// Remove white space		$custom_css =  preg_replace( '/\s+/', ' ', $custom_css );				// output css on front end		$css_output = "<style type=\"text/css\">\n" . $custom_css . "\n</style>";		if( !empty($custom_css) ) {			echo $css_output; // No need to escape		}};};?>

avatar rachmatsasongko
@rachmatsasongko

410 Kontribusi 426 Poin

Dipost 7 tahun yang lalu

emmm,,, solusinya,,?? :D

avatar Aziez
@Aziez

193 Kontribusi 18 Poin

Dipost 7 tahun yang lalu

sebelum di minified dihapus dulu komen2nya dari file asli

avatar rachmatsasongko
@rachmatsasongko

410 Kontribusi 426 Poin

Dipost 7 tahun yang lalu

EMMM,,,, Ok thanks gan ane coba hapus2 comentnya

avatar Aziez
@Aziez

193 Kontribusi 18 Poin

Dipost 7 tahun yang lalu

Login untuk ikut Jawaban