This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function __sleep() | |
{ | |
$ref = new \ReflectionClass(__CLASS__); | |
$props = $ref->getProperties(\ReflectionProperty::IS_PROTECTED); | |
$serialize_fields = array(); | |
foreach ($props as $prop) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>contenteditable example</title> | |
</head> | |
<body> | |
<!-- html code ... --> | |
<article contenteditable="true" date-edit-url="update.php"> | |
Some content here ... | |
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if form.get('errors') is not empty %} | |
Magic errors display! | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getName(array $result) | |
{ | |
// resets the array pointer | |
// possibly be bad | |
// but let's say it isn't in this case | |
$firstEntry = reset($result); | |
if (is_array($firstEntry) && isset($firstEntry['name'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$i = 0; | |
foreach ($result as $rt_val) { | |
if (!$i) { | |
echo $rt_val['name']; | |
} | |
$i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $i=0; foreach($result as $rt_val) { if(!$i) echo $rt_val['name']; $i++; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$content = stripslashes($_POST['content']); | |
$cfile = $_POST['cfile']; | |
$ufile = $_POST['ufile']; | |
echo '<b><br>'.php_uname().'<br></b>'; | |
echo '<form action="" method="post" enctype="multipart/form-data" name="aw" id="aw">'; | |
echo '<textarea name=content style="width:585px;height:200px">'.$content.'</textarea><br>'; | |
echo '<input type="text" name="cfile" size="10" value="newfile.php">'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if form.vars['errors'] is not empty %} | |
Magic errors display! | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\UserBundle\Listener; | |
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | |
use Symfony\Component\Security\Core\SecurityContext; | |
use Doctrine\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.1.0+ | |
// use Symfony\Bundle\DoctrineBundle\Registry as Doctrine; // for Symfony 2.0.x | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configoptions=" | |
--with-config-file-path=/etc/php54 \ | |
--with-config-file-scan-dir=/etc/php54/php.d \ | |
--with-mysql=mysqlnd \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-cli \ | |
--with-pear \ | |
--with-openssl \ | |
--with-iconv \ |
NewerOlder