当前位置: 首页>>代码示例>>PHP>>正文


PHP pp函数代码示例

本文整理汇总了PHP中pp函数的典型用法代码示例。如果您正苦于以下问题:PHP pp函数的具体用法?PHP pp怎么用?PHP pp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了pp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logFileBasic

function logFileBasic($logEntry, $rowNumber)
{
    $logEntry = $rowNumber . ' - ' . $logEntry . "\n";
    $fileName = $_SERVER['DOCUMENT_ROOT'] . "/log.txt";
    file_put_contents($fileName, $logEntry, FILE_APPEND | LOCK_EX);
    pp($logEntry);
}
开发者ID:vortexcoaching,项目名称:MQP_Alchemy__Truth,代码行数:7,代码来源:helperfunctions.blade.php

示例2: __construct

 /**
  * censusApp Constructor
  */
 public function __construct()
 {
     $this->registerPostType();
     add_action('add_meta_boxes', array($this, 'add_custom_meta_box'));
     add_action('save_post', array($this, 'save_custom_meta'));
     wp_register_script('wp_quiz_main_js', pp() . '/js/custom-js.js', array('jquery', 'jquery-ui-sortable'), null, true);
     wp_enqueue_script('wp_quiz_main_js');
 }
开发者ID:escobar022,项目名称:cens_wp,代码行数:11,代码来源:censusapp.php

示例3: showAction

 public function showAction()
 {
     $uid = (int) $_GET['uid'];
     $memeber = $this->model('member')->findByPrk($uid);
     pp($memeber);
     $this->model('member')->debug = true;
     $s = $this->model('member')->findField('username', array('uid' => $uid, 'username' => $memeber['username']));
     pp($s);
 }
开发者ID:BGCX067,项目名称:eyesphp-svn-to-git,代码行数:9,代码来源:mainController.class.php

示例4: getFile

function getFile()
{
    //$file = "data/Alchemy_Extract_final.csv";
    $file = "data/2016-02-04-Long_Names.csv";
    //$file = "data/a_testing.csv";
    $sr = serverRoot();
    //pp($sr.$file);
    if (file_exists($sr . $file) == 'true') {
        //pp($sr.$file);
        return $sr . $file;
    } else {
        pp('Source file ' . $sr . $file . ' does not exist');
    }
}
开发者ID:vortexcoaching,项目名称:MQP_Alchemy__Truth,代码行数:14,代码来源:testfunctions2confirmed.blade.php

示例5: pp

function pp($arr)
{
    $retStr = '<ul>';
    if (is_array($arr)) {
        foreach ($arr as $key => $val) {
            if (is_array($val)) {
                $retStr .= '<li>' . $key . ' => ' . pp($val) . '</li>';
            } else {
                $retStr .= '<li>' . $key . ' => ' . $val . '</li>';
            }
        }
    }
    $retStr .= '</ul>';
    return $retStr;
}
开发者ID:BLOODAXED,项目名称:gw2_thing,代码行数:15,代码来源:a.php

示例6: getInstance

 protected function getInstance($record, CsvImportProfile $profile)
 {
     pp('User address import get instance');
     $fields = $profile->getSortedFields();
     if (isset($fields['UserAddress']['ID'])) {
         $instance = ActiveRecordModel::getInstanceByID('UserAddress', $record[$fields['UserAddress']['ID']], true);
     } else {
         if (isset($fields['AddressUser']['ID'])) {
             $owner = User::getInstanceByID($record[$fields['AddressUser']['ID']], true);
         } else {
             if (isset($fields['AddressUser']['email'])) {
                 $owner = User::getInstanceByEmail($record[$fields['AddressUser']['email']]);
             }
         }
     }
     if (isset($owner)) {
         if ($profile->isColumnSet('AddressUser.isShipping')) {
             $type = $this->evalBool(strtolower($record[$profile->getColumnIndex('AddressUser.isShipping')])) ? 'ShippingAddress' : 'BillingAddress';
         } else {
             $type = 'BillingAddress';
         }
         $owner->loadAddresses();
     }
     if (empty($instance)) {
         if (empty($owner)) {
             return;
         }
         $isDefault = $profile->isColumnSet('AddressUser.isDefault') && $this->evalBool(strtolower($record[$profile->getColumnIndex('AddressUser.isDefault')]));
         if ($isDefault) {
             $field = 'default' . $type;
             $addressType = $owner->{$field}->get();
             $instance = $addressType->userAddress->get();
         }
         if (empty($addressType)) {
             $instance = UserAddress::getNewInstance();
             $addressType = call_user_func_array(array($type, 'getNewInstance'), array($owner, $instance));
             if ($isDefault) {
                 $owner->{$field}->set($addressType);
             }
         }
         $addressType->userAddress->set($instance);
         $instance->addressType = $addressType;
     }
     return $instance;
 }
开发者ID:saiber,项目名称:livecart,代码行数:45,代码来源:UserAddressImport.php

示例7: pp

function pp($obj, $indent = 0)
{
    foreach ($obj as $k => $v) {
        $type = gettype($v);
        if (\snow_eq($type, "string") || \snow_eq($type, "integer") || \snow_eq($type, "NULL")) {
            echo sprintf("%s%s: %s\n", str_repeat(" ", $indent * 2), (string) $k, (string) $v);
        } elseif (\snow_eq($type, "boolean")) {
            echo sprintf("%s%s: %s\n", str_repeat(" ", $indent * 2), (string) $k, $v ? "true" : "false");
        } elseif (\snow_eq($type, "object")) {
            echo sprintf("%s%s - %s\n", str_repeat(" ", $indent * 2), $k, get_class($v));
            pp($v, $indent + 1);
        } elseif (\snow_eq($type, "array")) {
            echo sprintf("%s%s - %s\n", str_repeat(" ", $indent * 2), $k, "array");
            pp($v, $indent + 1);
        } else {
            var_dump($type);
            throw new Exception("Type not implemented: " . $type);
        }
    }
    unset($k, $v);
}
开发者ID:runekaagaard,项目名称:snowscript,代码行数:21,代码来源:Visitors.php

示例8: redimensionne_image

		if ( $nom_photo === NULL or !file_exists($photos) ) {
			$photos = "../../mod_trombinoscopes/images/trombivide.jpg";
		}
		$valeur = redimensionne_image($photos);
    ?>
			<img src="<?php echo $photos; ?>" style="width: <?php echo $valeur[0]; ?>px; height: <?php echo $valeur[1]; ?>px; border: 0px" alt="" title="" />
	<?php
    } ?>
		</div>
		<div style="float: left; margin: 12.5px 0px 0px 0px; width: 36%">
			Nom : <strong><?php echo $nom_eleve; ?></strong><br />
			Prénom : <strong><?php echo $prenom_eleve; ?></strong><br />
			Date de naissance : <?php echo $naissance_eleve; ?><br />
			Age : <strong><?php echo age($date_de_naissance); ?> ans</strong><br />
			<br />
			Classe : <a href="#" class="info"><?php echo classe_de($login_eleve); ?><span style="width: 300px;">(Suivi par : <?php echo pp(classe_court_de($login_eleve)); ?>)</span></a>
		</div>
		<div style="float: left; background-image: url(../images/responsable.png); background-repeat:no-repeat; height: 175px; width: 20px; margin-left: 10px;">&nbsp;</div>
		<div style="float: left; margin: 12.5px; overflow: auto;  width: 40%;">
	<?php
		// L'affichage des responsables : le 1 est en rouge et est identifié comme tel
		$cpt_responsable = 0;
		while ( !empty($responsable_eleve[$cpt_responsable]) )
		{
			if ($responsable_eleve[$cpt_responsable]['resp_legal'] == 1) {
				$style = ' style="color: red;"';
				$text = '(resp. 1)';
			}else {
				if ($responsable_eleve[$cpt_responsable]['resp_legal'] == 2) {
					$style='';
					$text = '(resp. 2)';
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:gestion_absences.php

示例9: strpos_array

 private function strpos_array($haystack, $needles, $offset = 0)
 {
     if (is_array($needles)) {
         pp($needles);
         foreach ($needles as $needle) {
             $pos = $this->strpos_array($haystack, $needle);
             if ($pos !== false) {
                 return $pos;
             }
         }
         return false;
     } else {
         return strpos($haystack, $needles, $offset);
     }
 }
开发者ID:NukaCode,项目名称:Foundation,代码行数:15,代码来源:FormBuilder.php

示例10: pp

		<?php 
}
?>
		
	</div>

	<div id="left">
		<h1><?php 
echo $ex->getMessage();
?>
</h1>
		<?php 
if ($ex->getLine() == 0) {
    ?>
			<div><?php 
    pp($ex->getFile());
    ?>
</div>
		<?php 
} else {
    ?>
			<div>Error on line <?php 
    echo $ex->getLine();
    ?>
 of <?php 
    echo $ex->getFile();
    ?>
</div>
		<?php 
}
?>
开发者ID:jonthornton,项目名称:JMVC,代码行数:31,代码来源:exception_html.php

示例11: ppv

function ppv($v)
{
    ob_start();
    var_dump($v);
    pp(ob_get_clean());
}
开发者ID:NeoCortexBg,项目名称:zf2-todo,代码行数:6,代码来源:debug.php

示例12: isLoggedIn

 /**
  * check if the user has logged
  *
  * @return boolean
  */
 function isLoggedIn()
 {
     pp(111);
     return !empty($_SESSION[$this->__loginIndexInSession]) ? true : false;
 }
开发者ID:saiber,项目名称:www,代码行数:10,代码来源:class.auth.php

示例13: testClass

}
$a = new testClass();
$b = new emptyTestClass();
$res = fopen(__FILE__, 'r');
$val = array('string' => 'string', 'int' => 123, 'float' => 123.3, 'subarray' => array('a' => 'Lorem ipsum dolor sit amet, neptune reddens pater unica suae in fuerat construeret in fuerat accidens inquit merui litore. Opto cum magna aliter refundens domum sum in lucem exempli paupers coniunx in lucem exitum atque bona delata iuvenis. Eo debeas ait regem ut sua confusus eos, viam iube es ego esse ait est in. Musis nihilominus admonendus tu mihi quidditas. Tum vero rex ut diem obiecti ad te finis puellam effari ergo accipiet si. Vituperia ad suis caelo in rei exultant deo hanc! Taliarchum in fuerat est se sed, nuptui tradiditque corpus multis miraculum manibus dimittit in! Nuntiatur quae ait Cumque hoc ait regem consolatus dum veniens Theophilum vinum dolor Jesus Circumdat flante vestibus mundo anima. Lycoridem Apollonio vidit pater beneficiorum universos civitatem auri tecum ad suis ut libertatem accipies. Redde pariter necandum loco in deinde vero rex in modo. Acceptis codicello de his domino nostrud exercitu necessitate sit dolor ad per dicis ubi diu desideriis meo.', 'b' => 'Quattuordecim anulum in modo invenit', 'subsubarray' => array('Lorem ipsum dolor sit amet', 'deducitur potest meum festinus', 'pervenissem filia omnes deo', 'hanc nec caecatus dum animae')), 'false' => FALSE, 'true' => TRUE, 'null' => NULL, 'object' => $a, 'resource' => $res, 'emptyArray' => array(), 'emptyObject' => $b);
?>
<div style="overflow: hidden">
	<div style="width: 50%; float: left;"><h2>pp( $val )</h2><?php 
pp($val);
?>
</div>
	<div style="width: 50%; float: left;"><h2>print_r( $val ) + &lt;pre&gt;</h2><pre><?php 
print_r($val);
?>
</pre></div>
</div>
<h2 id="autoCollapsed">Folded array</h2>
<?php 
pp($val, TRUE);
?>
<h2 id="autoOpened">Array unfolded to keys "c" and "subarray"</h2>
<?php 
pp($val, array('autoOpen' => array('c', 'subarray')));
?>
<h2 id="autoOpened2">Array unfolded to key "c"</h2>
<?php 
pp($val, 'c');
fclose($res);
?>
</body>
</html>
开发者ID:alexxxnf,项目名称:nf_pp,代码行数:31,代码来源:demo.php

示例14: function

<?php

require 'pp.php';
$fib = function ($n) use(&$fib) {
    switch ($n) {
        case 0:
            return 0;
        case 1:
            return 1;
        default:
            return $fib($n - 1) + $fib($n - 2);
    }
};
pp('fib', $fib(7));
$calls = 0;
$counted = function ($f) {
    return function ($f) use($f) {
        global $calls;
        $args = func_get_args();
        $calls++;
        return $f($args[0]);
    };
};
$fib = $counted($fib);
//$calls = 0;
//printf("%d called 'fib' %d times\n", $fib(30), $calls);
//$calls = 0;
//printf("%d called 'fib' %d times\n", $fib(31), $calls);
$memoize = function ($f, $normalize = null) {
    $results = array();
    if (!$normalize) {
开发者ID:kiltec,项目名称:higherorder-php,代码行数:31,代码来源:4-fib.php

示例15: pd

/**
 * Dump the contents of a variable and exit(). Similar to pp()
 * @param mixed $data
 * @return void
 */
function pd($data)
{
    if (!IS_PRODUCTION) {
        pp($data);
        die;
    }
}
开发者ID:jonthornton,项目名称:JMVC,代码行数:12,代码来源:init.php


注:本文中的pp函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。