substr('elxis', 0, 3);
eUTF::utf8_substr('έλξις', 0, 3);
eUTF::utf8_strlen('έλξις');
$handle = fopen('myfile.txt', 'r');$contents = fread($handle, filesize('myfile.txt'));fclose($handle);
$contents = $fmanager->readFile('myfile.txt');
$xfiles = array();if ($handle = opendir('images')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { array_push($xfiles, $file); } } closedir($handle); }
$xfiles = $fmanager->listFiles('images');
unlink('myfile.txt');
$fmanager->deleteFile('myfile.txt');
$query = "SELECT * FROM #__banner WHERE showbanner = '1' ORDER BY ".$database->_resource->random;
# Bad example:SELECT b.bid, b.name AS bannername FROM #__banner AS b WHERE b.cid='1';# Good examples:SELECT b.bid, b.name AS bannername FROM #__banner b WHERE b.cid='1';# orSELECT b.bid, b.name bannername FROM #__banner b WHERE b.cid='1';
$query = "SELECT a.name AS title, a.description AS text, '' AS created, '2' AS browsernav,"."\n s.id AS secid, a.id AS catid, m.id AS menuid, m.type AS menutype,". "\n ".$database->_resource->Concat('s.seotitle', "'/'", 'a.seotitle', "'/'")." AS seolink". "\n FROM #__categories a"......
require_once($mainframe->getCfg('absolute_path').'/includes/adodb/adodb-xmlschema.inc.php');$schemafile = 'path/to/your/schema/file/myschema.xml';$schema = new adoSchema( $database->_resource );$schema->ContinueOnError( true );$schema->SetPrefix($database->_table_prefix);$schema->ParseSchema( $schemafile );$schema->ExecuteSchema();
<sql platform="oci8"> <query>INSERT INTO banner ...</query></sql>
<?php $query = "SELECT * FROM #__XXXXXX"."\n WHERE ......"."\n AND access IN (".$my->allowed.")";?>
<?php //mambo/joomla$query = "SELECT * FROM #__XXXXXX"."\n WHERE ......"."\n AND access > 0";?>