Troubleshoot: PHP `No Input File Specified` Error

Are you using pretty URL on your web application or website? Having problem with “No input file specified error” from PHP? Confused why my PHP code is not working? The PHP code is working flawlessly on localhost but why is not  working now? Which php file is causing this error? Is it web server or PHP related problem? If some of questions answer is yes and when you are using Continue reading Troubleshoot: PHP `No Input File Specified` Error

Backup Your MySQL Database Contents to SQL File Using PHP

Here’s a snippet to backup MySQL database content to SQL file using PHP code. This code is very useful when you want to make a daily or hourly snapshot of your currently running database. Or maybe you want to add a backup feature on your blog CMS. backup_tables(‘localhost’,’username’,’password’,’blog’); /* backup the db OR just a table */ function backup_tables($host,$user,$pass,$name,$tables = ‘*’) { $link = mysql_connect($host,$user,$pass); mysql_select_db($name,$link); //get all of the Continue reading Backup Your MySQL Database Contents to SQL File Using PHP

Kriteria Project Akhir Mata Kuliah Pemrograman Web Genap 2012/2013

Berikut ini adalah kriteria Project Akhir untuk matakuliah Pemrograman Web semester genap 2012/2013. Project akhir untuk matakuliah ini adalah membuat sebuah aplikasi berbasis web. Kelas yang diampu adalah: Informatika/Ilmu Komputer A Sistem Informasi A Sistem Informasi B Project Aplikasi web bersifat dinamis dengan data dinamis Menggunakan PHP dan MySQL Data yang disimpan dalam database minimal 2 tabel yang saling berelasi. Aplikasi harus mengimplementasikan CRUD (Create Read Update Delete) Request Method Continue reading Kriteria Project Akhir Mata Kuliah Pemrograman Web Genap 2012/2013

Replace Multiple Backslash Character Using preg_replace() in PHP

It seems like an easy problem to solve, but It’s not as easy as it seems. Assuming I have this string in PHP: \\\super\\\\\\man\\\ and I would like to replace all the backslashes into space or other characters is not as easy as using str_replace() function. The number of backslashes may be 1 or more. But all consecutive need to be replace into ONE space.

File Handling in PHP: Read/Write To And From Text File

As a simple data storage alternative to Database Management System (e.g. MySQL) in PHP we can use plain text file. For example, a plain text file to store page counter information. Below is an example on how to store a simple string (text) into a text (.txt) file: <?php $data = ‘some text’; $fp = fopen(‘counter.txt’, ‘w’); if($fp) { fwrite($fp, $data); fclose($fp); } ?> Assuming a file named counter.txt exists Continue reading File Handling in PHP: Read/Write To And From Text File

Pemrograman Web PTIIK Genap 2012/2013: PHP File and Directory Handling

Update 21 Maret 2013: Contoh penanganan data dari form pada file dapat di-download. Berikut ini adalah slide presentasi pada pertemuan IV: PHP File and Directory Handling untuk mata kuliah Pemrograman Web semester Genap 2012/2013. Kelas yang diampu adalah kelas: Sistem Informasi A Sistem Informasi B Informatika A Hal-hal yang dibahas dalam pertemuan keempat mata kuliah ini mencakup penjelasan mengenai: File Handling Open and Closing File FIle Open Modes Read Data Opening Continue reading Pemrograman Web PTIIK Genap 2012/2013: PHP File and Directory Handling

Pemrograman Web PTIIK Genap 2012/2013: PHP Fundamentals

Update 19 Mar 2013: PHP companion files untuk sub-materi Session dan Cookie dapat di-download. Berikut ini adalah slide presentasi pada pertemuan III: PHP Fundamentals and State untuk mata kuliah Pemrograman Web semester Genap 2012/2013. Kelas yang diampu adalah kelas: Sistem Informasi A Sistem Informasi B Informatika A Hal-hal yang dibahas dalam pertemuan kedua mata kuliah ini mencakup penjelasan mengenai: Apache web server administration and configuration, PHP, and why PHP? Sistem and software Continue reading Pemrograman Web PTIIK Genap 2012/2013: PHP Fundamentals

Pemrograman Web: Tugas Pengganti Kuliah – Selasa 5 Maret 2013

Perkuliahan mata kuliah Pemrograman Web untuk kelas SI-A dan SI-B hari Selasa 5 Maret 2013 diberikan tugas pengganti perkuliahan dikarenakan saya selaku dosen pengampu mata kuliah tersebut ada tugas untuk mengajar di Universitas Brawijaya Kediri. Adapun tugas pengganti untuk mata kuliah tersebut hari Selasa 5 Maret 2013 adalah: Carilah sebuah permasalahan dan algoritma yang dapat menyelesaikan permasalahan tersebut (contoh: sort, search, perpangkatan, dll). Daftar pilihannya dapat dilihat di link ini, Continue reading Pemrograman Web: Tugas Pengganti Kuliah – Selasa 5 Maret 2013