Menuliskan Source Code di Blogspot

Menuliskan Source Code di Blogspot

Menggunakan codeformatter

Contoh ke-1

1:  /**  
2:   * Namafile : config.php   
3:   * ----------------------------*/  
4:  $dbhost = 'localhost';   
5:  $dbuser = 'root';   // ini berlaku di xampp  
6:  $dbpass = '';     // ini berlaku di xampp  
7:  $dbname = 'database_kita';  
8:  // melakukan koneksi ke database  
9:  $connect = new mysqli($dbhost,$dbuser,$dbpass,$dbname);  
10:  // cek koneksi yang kita lakukan berhasil atau tidak  
11:  if ($connect->connect_error) {  
12:    // jika terjadi error, matikan proses dengan die() atau exit();  
13:    die('Maaf koneksi gagal: '. $connect->connect_error);  
14:  }  

Contoh ke-2
Menggunakan formatmysourcecode

<?php
/**
 * Namafile : config.php 
 * ----------------------------*/
 
$dbhost = 'localhost'; 
$dbuser = 'root';     // ini berlaku di xampp
$dbpass = '';         // ini berlaku di xampp
$dbname = 'database_kita';
 
// melakukan koneksi ke database
$connect = new mysqli($dbhost,$dbuser,$dbpass,$dbname);
 
// cek koneksi yang kita lakukan berhasil atau tidak
if ($connect->connect_error) {
   // jika terjadi error, matikan proses dengan die() atau exit();
   die('Maaf koneksi gagal: '. $connect->connect_error);
}

Share this

Related Posts

Previous
Next Post »

40 komentar

komentar
September 7, 2017 at 6:35 PM delete

http://51054-rahandinoorpasha.blogspot.co.id/

Reply
avatar
September 7, 2017 at 6:40 PM delete

http://farizputradandi.blogspot.co.id/2017/09/blog-post_7.html

Reply
avatar
September 7, 2017 at 6:43 PM delete

https://muhtaufiqulsadi.blogspot.co.id/2017/09/blog-post_7.html

Reply
avatar
September 7, 2017 at 6:44 PM delete

https://brilianwm.blogspot.co.id/2017/09/brilian-widya-mustofa-5114100047.html

Reply
avatar
September 7, 2017 at 6:45 PM delete

https://dhafah16.blogspot.co.id/2017/09/profil-mahasiswa.html

Reply
avatar
September 7, 2017 at 6:46 PM delete

http://muhajirabdullatif.blogspot.co.id/2017/09/profil.html

Reply
avatar
September 7, 2017 at 6:46 PM delete

https://rifqimuktiw.blogspot.co.id/2017/09/identitas.html

Reply
avatar
September 7, 2017 at 6:46 PM delete

http://nuzhamusyafira.blogspot.co.id/2017/09/blog-post.html?m=1

Reply
avatar
September 7, 2017 at 6:46 PM delete

http://m-khairuddin16.blogspot.com/2017/09/blog-post.html

Reply
avatar
September 7, 2017 at 6:47 PM delete

http://farizpurnomo.blogspot.co.id/2017/09/blog-post_7.html

Reply
avatar
September 7, 2017 at 6:47 PM delete

http://hafidsb30.blogspot.co.id/2017/09/blog-post.html

Reply
avatar
September 7, 2017 at 6:47 PM delete

Deddy Aditya P. 5116100069
https://adityapramanapbo.blogspot.co.id/?m=1

Reply
avatar
I
September 7, 2017 at 6:48 PM delete

https://ilhamsyamsuddin.blogspot.co.id/2017/09/

Reply
avatar
September 7, 2017 at 6:48 PM delete

http://bayutakariputra.blogspot.co.id/2017/09/biodata.html

Reply
avatar
September 7, 2017 at 6:48 PM delete

https://saniyatulmawaddah.blogspot.co.id/2017/09/biodata.html

Reply
avatar
September 7, 2017 at 6:48 PM delete

http://riosurya12.blogspot.co.id/2017/09/blog-post_7.html#more

Reply
avatar
September 7, 2017 at 6:48 PM delete

https://aidilabdillah98.blogspot.co.id/2017/09/biodata.html

Reply
avatar
September 7, 2017 at 6:49 PM delete

http://rifqiaramadhan.blogspot.co.id/2017/09/blog-post.html

Reply
avatar
September 7, 2017 at 6:49 PM delete

https://aznisafajriyati.blogspot.co.id/

Reply
avatar
September 7, 2017 at 6:49 PM delete

http://fanlya.blogspot.co.id/2017/09/biodata.html

Reply
avatar
September 7, 2017 at 6:49 PM delete

http://catatankesatria.blogspot.co.id/2017/09/tak-kenal-maka-tak-sayang.html

Reply
avatar
September 7, 2017 at 6:49 PM delete

http://dennashassel.blogspot.co.id/2017/09/nama-hassel-adjani.html

Reply
avatar
September 7, 2017 at 6:49 PM delete

Faridatul N.A 5116100010
https://fafaaidah20.blogspot.co.id/2017/09/nama-n.html

Reply
avatar
September 7, 2017 at 6:51 PM delete

https://yoshimashima.blogspot.co.id/

Reply
avatar
September 7, 2017 at 6:51 PM delete

http://ganendra13.blogspot.com/

Reply
avatar
September 7, 2017 at 6:51 PM delete

http://farrasrabbani.blogspot.co.id/2017/09/blog-post_7.html

Reply
avatar
September 7, 2017 at 6:52 PM delete

http://vickymuhammad16.blogspot.co.id/2017/09/profil.html

Reply
avatar
September 7, 2017 at 6:53 PM delete This comment has been removed by the author.
avatar
September 7, 2017 at 6:54 PM delete

https://muzayyinamrullah.blogspot.com/2017/09/blog-post.html

Reply
avatar
September 7, 2017 at 6:55 PM delete

http://nizar07zulmi.blogspot.co.id/

Reply
avatar
September 7, 2017 at 6:56 PM delete

https://poedjarizki.blogspot.co.id/2017/09/blog-post.html?m=1

Reply
avatar
September 7, 2017 at 7:00 PM delete

http://nidaregitafauzianti.blogspot.co.id/2017/09/biodata-nama-nida-regita-fauzianti-nrp.html

Reply
avatar
September 7, 2017 at 7:06 PM delete

http://mauliaramdan.blogspot.co.id/2017/09/blog-post.html#more

Reply
avatar
September 7, 2017 at 7:20 PM delete

https://dhanupt.blogspot.com/2017/09/blog-post.html

Reply
avatar
September 14, 2017 at 4:26 AM delete

http://kurniawanajisaputro.blogspot.co.id/p/blog-page.html

Reply
avatar
September 14, 2017 at 4:24 PM delete This comment has been removed by the author.
avatar
September 14, 2017 at 5:30 PM delete

http://roziqzuama.blogspot.co.id/2017/09/blog-post.html

Reply
avatar
September 1, 2021 at 6:09 AM delete

Nama : Fitrah Arie Ramadhan
Kelas : Pemrograman Web D
Tahun : 2021
Link Blog : Blogspot

Reply
avatar