Kayıtlar

Eylül, 2014 tarihine ait yayınlar gösteriliyor

DÜŞÜN,

Dynamic PHP Copyright Date Code

Pretty simple but pretty handy too! Here's a short tutorial to generate the current year in your footer's copyright declaration. It also detects if the the site has been running for less than a year to avoid the date printing out like this © 2011-2014 rather than just this © 2011. Example: Arastiriyorum © 2010-2014 All Rights Reserved. Both of these methods work the same way. Pure PHP echo "Arastiriyorum &copy "; $start_year = 2010; //change to the year you launched your website echo (date('Y') == $start_year) ? $start_year : $start_year . "-" . date('Y'); echo " All Rights Reserved. "; Mixed HTML & PHP Arastiriyorum ©   $start_year = 2010; //change to the year you launched your website   echo (date('Y') == $start_year) ? $start_year : $start_year . "-" . date('Y'); ?> All Rights Reserved. If you're looking to add the trademark symbol (™) or any others check out CopyPasteCh

Enable Write Permissions for the Native Built-In Apache in Mac OS X Lion

When using the native built in version of Apache in Lion OS X you won't have write permissions unless you change the User and Group settings in apache's httpd.conf file. Here are some quick instructions on how to achieve that. Open Terminal and Enter sudo nano /private/etc/apache2/httpd.conf Find and change http.conf code from User _www Group _www To User your_mac_username Group staff # With earlier versions such as Leopard, capitalise staff to Staff Restart apache by going to System Preferences > Sharing and un-tick then tick Web Sharing. PHP to check write permissions are enabled echo (is_writable('.')) ? "writable" : "not writable";

How to write PHP with CSS Syntax

I've recently designed a template system, and wanted to make it as easy as possible for the designers to enter values into PHP functions. So I wrote a little function to allow a CSS style string to be converted into an array. Regular PHP Method //The line of code the designer has to edit echo createPosition('header', '100px', '200px'); function createPosition($name, $height, $width) {   return  ' . $name . '" style="height:' . $height . ';width:' . $width . ';">' . $name . ' '; } CSS Style PHP //The line of code the designer has to edit echo createPosition('name:header; width:100px; height:200px'); function attrStringToArray($attr_string) {   $attr = array();   foreach(explode(';', $attr_string) AS $attr_temp) {     if (strlen(trim($attr_temp)) > 0) {       list($name, $value) = explode(':', $attr_temp);       $attr[trim($name)] = trim($value);     }  

Windows 7: Optional update delivery is not working - “You may be a victim of software counterfeiting.”

Resim
  For several years now Microsoft started to fight non-genuine copies of Windows. Unfortunately still some legal copies are affected by the anti-piracy system. Once you see the message above (Windows Vista or 7) reboot your system as soon as possible and once you login again, Click the Start Menu type “activate windows”. However some users click “Get online and resolve now” link and they get a message Windows Activation: “An unauthorized change was made to Windows. You must reinstall or restore Windows system files to activate.” Proceed with the same procedure, reboot your PC and Activate windows. Microsoft also recommends to uninstall programs that checks your system files such as anti-spyware and third-party firewall. For me, anti-piracy is not needed in all version of Windows because sometimes this a good strategy for both both hardware and software manufacturer to popularize a product. Anyway, All of us have different views but most of the time we share the sam

SSH Shell Komutları ve Açıklamaları

* ls Dizinde bulunan her şeyi listeler. * ls -a Gizli dosyalar ve dizinlerle beraber listeler. * ls -l Bütün dosyaları boyut ve tarihini göstererek listeler. * tar -zxpf Uzantısı tar.gz olan sıkıştırılmış dosyaları açar. * tar -xpf Uzantısı .tar olan dosyaları açar. * gunzip Uzantısı .gz olan dosyaları açar. * cp Dosyayı kopyalar. * mv Bir dosyayı başka bir dizine taşımanızı sağlar ya da dosya adını değiştirir. * mkdir Yeni bir dizin oluşturmanızı sağlar. * rmdir Belirtilen dizini silmenizi sağlar. * rm Dosya silmenizi sağlar. * rm -rf Dizin silmenizi sağlar. * cd Belirtilen dizine geçmenizi sağlar. * cd .. Bir üst dizine geçmenizi sağlar. * cd ~ En üst dizine çıkmanızı sağlar. * pwd O anda bulunduğunuz dizini görüntüler. * pico Belirtilen dosyayı text editör ile düzenlemenizi sağlar. * ftp Belirtilen siteye FTP bağlantısı sağlar. * lynx Belirtilen siteyi görüntüler. * df Harddisk istatistiklerini gösterir. * quota Disk kullanımınızı gösterir. * uname İşletim siste

Linux Dosyalar içinde arama yapmak

LINUX üzerinde find komutu ile dosyalar içinde arama yapabilirsiniz, alt dizinleri de dahil eden bu arama yöntemi için: find komutu ile find . -iname '*conf' | xargs grep 'kelime' -sl  -iname ‘*conf’ bölümü aramanın sadece conf dosyalarında yapılacağını belirtir, -iname ‘*’ yazmanız durumunda tüm dosyalarda arama yapılacaktır. grep ‘kelime’ ise aranacak sözcüğün “kelime” olduğunu belirtir. Sadece dosya isimleri ile arama yapmak istiyorsanız, arama veritabanını güncelleyip daha sonra arama yapmanızı tavsiye ederiz: updatedb locate dosyaadi    Linux find ile büyük dosyaları bulmak Aşağıdaki komut ile /dizin dizininde boyutu 100 MB ve üzeri olan dosyaları bulup sadece isimlerini yazdırabilirsiniz: find /dizin/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'    Linux find ile dosya değiştirme ya da oluşturma tarihine göre dosyaları bulma Aşağıdaki komut ile /dizin dizininde iki gü