コード例 #1
0
ファイル: publisher.php プロジェクト: kemao/php
 private function pubConfig($file, $filename)
 {
     // 移除old文件
     if (stripos($filename, ".old") !== false) {
         printline("remove old file:" . $file);
         unlink($file);
     }
     //var_dump($filename);
     if (stripos($filename, ".pub") !== false) {
         printline("config replace {$file}");
         $pubfile = str_replace(".pub", "", $file);
         unlink($pubfile);
         rename($file, $pubfile);
     }
 }
コード例 #2
0
<?php

function printLine($head)
{
    $head = "printLine";
    echo $head . '<br>';
}
printline('This is the printline statement');
function displayHeader($head, $subhead)
{
    echo '<h1>' . $head . '</h1>';
    echo '<h2>' . $subhead . '</h2>';
}
displayheader('Heading h1', 'Sub Heading h2');
コード例 #3
0
<?php

function printLine($head)
{
    echo $head . '<br>';
}
printline('I am a printline statement');
function displayHeader($head, $subhead)
{
    echo '<h1>' . $head . '</h1>';
    echo '<h2>' . $subhead . '</h2>';
}
displayHeader('Heading h1', 'Sub Heading h2');
コード例 #4
0
ファイル: BuildFile.php プロジェクト: kemao/php
 private function ts()
 {
     printline("ts compile: " . $this->file);
     $cmdtpl = "node %s %s";
     $cmd = sprintf($cmdtpl, $this->tsc, $this->file);
     system($cmd);
     $file = str_replace(".ts", ".js", $this->file);
     $pushFile = str_replace(".ts", ".js", $this->publishPath);
     copy($file, $pushFile);
     unlink($file);
     $this->js($pushFile);
 }
コード例 #5
0
ファイル: gitrip.php プロジェクト: RonnieSkansing/gitrip
<?php

function printLine($text)
{
    echo $text . PHP_EOL;
}
if (isset($argv[1], $argv[2]) === false) {
    printLine('Invalid');
    printLine('Example:');
    printLine('php ./gitrip.php http://localhost:8080/.git/index ./build');
    exit;
}
list(, $targetRepoUrl, $buildPath) = $argv;
printline('Trying to get index of ' . $targetRepoUrl);
$handle = fopen($targetRepoUrl, 'r');
if (is_resource($handle) === false) {
    printLine('Could not open index file on remote');
    exit;
}
/**
 * Make build folder and init git
 */
if (is_dir($buildPath) === false) {
    mkdir($buildPath . '/.git/', 0777, true);
    // @todo reconsider perms
}
$targetIndex = $buildPath . '/.git/index';
/**
 * Remove any created index file
 */
if (file_exists($targetIndex === false)) {
コード例 #6
0
$tab .= printline('11');
$tab .= printline2('11');
$tab .= printline3('11');
$tab .= printline('12');
$tab .= printline2('12');
$tab .= printline3('12');
$tab .= printline3('1');
$tab .= printline('2');
$tab .= printline('21');
$tab .= printline2('21');
$tab .= printline3('21');
$tab .= printline('22');
$tab .= printline2('22');
$tab .= printline3('22');
$tab .= printline3('2');
$tab .= printline('3');
$tab .= printline2('3');
$tab .= printline3('3');
$tab .= "</tbody></table>";
switch ($proses) {
    case 'preview':
        echo $tab;
        break;
    case 'excel':
        $tab .= "Print Time:" . date('Y-m-d H:i:s') . "<br />By:" . $_SESSION['empl']['name'];
        $dte = date("YmdHis");
        $nop_ = "laparuskasbudget_" . $kodeOrg . $thnBudget . "_" . $dte;
        $gztralala = gzopen("tempExcel/" . $nop_ . ".xls.gz", "w9");
        gzwrite($gztralala, $tab);
        gzclose($gztralala);
        echo "<script language=javascript1.2>\r\n                        window.location='tempExcel/" . $nop_ . ".xls.gz';\r\n                        </script>";
コード例 #7
0
// printline3 = sum
$tab .= printline('5');
$tab .= printline2('5');
$tab .= printline3('5');
$tab .= printline('6');
$tab .= printline2('6');
$tab .= printline3('6');
$tab .= printline('7');
$tab .= printline2('7');
$tab .= printline3('7');
$tab .= printline4();
$tab .= printline('8');
$tab .= printline2('8');
$tab .= printline3('8');
$tab .= printline5();
$tab .= printline('9');
$tab .= printline2('9');
$tab .= printline3('9');
$tab .= printline6();
$tab .= "</tbody></table>";
switch ($proses) {
    case 'preview':
        echo $tab;
        break;
    case 'excel':
        $tab .= "Print Time:" . date('Y-m-d H:i:s') . "<br />By:" . $_SESSION['empl']['name'];
        $dte = date("YmdHis");
        $nop_ = "laparuskasbudget_labarugi_" . $kodeOrg . $thnBudget . "_" . $dte;
        $gztralala = gzopen("tempExcel/" . $nop_ . ".xls.gz", "w9");
        gzwrite($gztralala, $tab);
        gzclose($gztralala);