Skip to content

Instantly share code, notes, and snippets.

View ertuncefeoglu's full-sized avatar

Ertunç Efeoğlu ertuncefeoglu

View GitHub Profile
@ertuncefeoglu
ertuncefeoglu / oci_stored_proc_bind_params.php
Created September 24, 2013 10:45
Calling Oracle stored procedures from PHP and binding parameters
<?php
public function runTestCollections() {
pre("SORGU BAÞLIYOR...");
$tarih = '20130401';
//$sonuc = array();
$SQL = "BEGIN TEST_COLLECTIONS(:TARIH, :SONUC); END;";
@ertuncefeoglu
ertuncefeoglu / dsap_oci_connect_index.php
Created September 24, 2013 10:42
Oracle database connection without adodb php library using only oci functions
<?php
//phpinfo();die;
show();
function show() {
$conn=connect();
$text= '<html>';
$text.='<meta http-equiv="Cache-Control" content="no-store,no-cache,max-age=-1">
<meta http-equiv="Pragma" content="no-cache">
@ertuncefeoglu
ertuncefeoglu / ajax_answer
Created September 24, 2013 10:39
Ajax çağrısı ve dosyadan okunarak döndürülecek değer
ajax isteğine döndürülecek metini buraya yazıyoruz.
@ertuncefeoglu
ertuncefeoglu / iconv_utf8_encoder.php
Created September 24, 2013 10:31
Change file encoding for code scripts using PHP
<?php
function deltree( $f ,$filename,$remove=false){
if( is_dir( $f ) ){
foreach( scandir( $f ) as $item ){
if( !strcmp( $item, '.' ) || !strcmp( $item, '..' ) || !strcmp( $item, '.svn' ) )
continue;
$path= $f . "/" . $item;
deltree($path,$filename,$remove );
@ertuncefeoglu
ertuncefeoglu / console_database
Created September 24, 2013 10:26
Delphi command line adodb database connection
program ProjectMysqlADO;
{$APPTYPE CONSOLE}
uses
ActiveX,
DB,
ADODB,
SysUtils;
@ertuncefeoglu
ertuncefeoglu / fluent_interface
Created September 24, 2013 09:27
Fluent interface design patter için PHP ile örnek
fluent interface design pattern - method chaining olarak da adlandırılabilir
class propertylere değer atayan setter methodlar içersinde return $this ile objeji döndürüyoruz
public function setAd($ad){
$this->_ad = $ad;
}
public function setSoyad($soyad){
$this->_soyad = $soyad;