本文整理汇总了PHP中base函数的典型用法代码示例。如果您正苦于以下问题:PHP base函数的具体用法?PHP base怎么用?PHP base使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了base函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: proveedores
function proveedores()
{
$producto = $_POST["producto"];
$empresa = $_POST["empresa"];
$ID = $_POST["ID"];
base($producto, $empresa, $ID);
}
示例2: inventario
function inventario()
{
$serial = $_POST["Txtserial"];
$nombre = $_POST["Txtnombre"];
$valor = $_POST["Txtvalor"];
$cantidad = $_POST["Txtcantidad"];
$proveedor = $_POST["Txtproveedor"];
base($serial, $nombre, $valor, $cantidad, $proveedor);
}
示例3: cliente
function cliente()
{
$documento = $_POST["txtDocumento"];
$nombre = $_POST["txtNombre"];
$apellido = $_POST["txtApellido"];
$correo = $_POST["txtCorreo"];
$telefono = $_POST["txtTelefono"];
base($documento, $nombre, $apellido, $correo, $telefono);
}
示例4: set
/**
* Sets the component.
*
* @param \Interop\Container\ContainerInterface $container
* @return void
*/
public function set(ContainerInterface &$container)
{
// Loads the environment variables from an .env file.
(new Dotenv(base()))->load();
// Sets the default timezone
date_default_timezone_set(env('timezone', 'Asia/Manila'));
// Start the session
session_start();
}
示例5: recolectar
function recolectar()
{
$documento = $_POST['documento'];
$fecha = $_POST['fecha'];
$serial = $_POST['serial'];
$producto = $_POST['nombre'];
$cantidad = $_POST['cantidad'];
$precio = $_POST['precio'];
base($fecha, $documento, $serial, $cantidad, $precio, $producto);
}
示例6: deconnexion
function deconnexion()
{
global $page;
$page['gabarit'] = "base";
$page['vue'] = "connexion.vue.php";
if (isset($_SESSION['id_user'])) {
session_unset();
session_destroy();
}
base();
}
示例7: inventario
function inventario()
{
$id = $_POST["txtId"];
$docu = $_POST["txtDocu"];
$serial = $_POST["txtSerial"];
$cant = $_POST["txtCant"];
$precio = $_POST["txtPre"];
$nombre = $_POST["txtNom"];
$fecha = $_POST["txtFecha"];
base($id, $docu, $serial, $cant, $precio, $nombre, $fecha);
}
示例8: config
/**
* Gets the configuration from the specified file.
*
* @param string $key
* @param string $defaultValue
* @return mixed
*/
function config($key = null, $defaultValue = null)
{
$arrayKeys = explode('.', $key);
$filePath = base('app/config/' . $arrayKeys[0] . '.php');
if (!file_exists($filePath)) {
throw new InvalidArgumentException('File not found.');
}
$value = (require $filePath);
for ($i = 1; $i < count($arrayKeys); $i++) {
$value =& $value[$arrayKeys[$i]];
}
return empty($value) ? $defaultValue : $value;
}
示例9: set
/**
* Sets the component.
*
* @param \Interop\Container\ContainerInterface $container
* @return void
*/
public function set(ContainerInterface &$container)
{
$entityManager = $container->get('Doctrine\\ORM\\EntityManager');
$path = base('src/Repositories/');
$files = glob($path . '*Repository.php');
foreach ($files as $item) {
$entity = str_replace([$path, 'Repository.php'], ['', ''], $item);
$model = 'App\\Models\\' . $entity;
$name = 'App\\Repositories\\' . $entity . 'Repository';
$metadata = $entityManager->getClassMetadata($model);
if ($container instanceof Container) {
$container->add($name, new $name($entityManager, $metadata));
}
}
}
示例10: view
/**
* Renders a view from a template.
*
* @param string $template
* @param array $data
* @return string
*/
function view($template, $data = [])
{
$loader = new Twig_Loader_Filesystem(base('app/views'));
$twig = new Twig_Environment($loader);
// Loads the filters
$twig->addFilter(new Twig_SimpleFilter('url', 'url'));
$twig->addFilter(new Twig_SimpleFilter('json', 'json'));
// Loads the globals
$twig->addGlobal('request', request());
$twig->addGlobal('session', session());
// Loads the functions
$twig->addFunction(new Twig_SimpleFunction('carbon', 'carbon'));
$twig->addFunction(new Twig_SimpleFunction('session', 'session'));
$renderer = new Rougin\Slytherin\Template\Twig\Renderer($twig);
session(['old' => null, 'validation' => null]);
return $renderer->render($template, $data, 'twig');
}
示例11: load_shots
function load_shots($dbc, $image_path, $path, $query)
{
$images = get_shots($dbc, $query);
foreach ($images as $image) {
?>
<div class="mt-shot-card">
<div class="mt-shot-image">
<a href="?id=<?php
echo $image['shotID'];
?>
" style="margin:0;">
<img src="<?php
echo base($path) . '../../' . '/' . $image_path . $image['shotFileName'] . '.' . $image['shotFileType'];
?>
">
</a>
</div>
</div>
<?php
}
}
示例12: mysql_connect
<div align="center">Titre :
<input name="titre" id="titre" type="text" size="35"/>
<br/><br/>
<input name="maj" type="text" value="0" id="maj" style="display:none"/>
<?php
if (isset($_GET['info'])) {
?>
<script type="text/javascript">
document.getElementById('maj').value="<?php
echo $_GET['info'];
?>
";
</script>
<?php
mysql_connect(hote(), user(), password());
mysql_select_db(base());
$reponse = mysql_query('SELECT * FROM tuto WHERE num="' . $_GET['info'] . '"') or die(mysql_error());
if ($donnees = mysql_fetch_array($reponse)) {
?>
<script type="text/javascript">
document.getElementById('titre').value="<?php
echo addslashes($donnees['titre']);
?>
";
</script>
<?php
}
}
?>
<textarea
name="txt"
示例13: base
<?php
// имя модуля
$module_name = 'site';
require_once base('modules/' . $module_name . '/tree_utils.class');
require_once base('modules/' . $module_name . '/main.class');
require_once base('modules/' . $module_name . '/page.class');
$module_loader =& Registry::get('TModuleLoader');
$module_loader->registerClassFile('TMenu', 'modules/' . $module_name . '/menu');
$module_loader->registerClassFile('TUserAuth', 'modules/' . $module_name . '/user_auth.class');
示例14: describe
<?php
describe('User interactions', function () {
beforeEach(function () {
clear_app();
});
describe('visiting the homepage as a visitor', function () {
it('shows hello world', function () {
browser()->visit(base() . '/');
expect(page())->toContainText('Hello world!');
});
});
describe('visiting the homepage as a logged in user', function () {
beforeEach(function () {
update_user('test', 'test', 'ROLE_USER');
});
it('is possible to login as the user', function () {
browser()->visit(base() . '/login');
page()->fillField('Username', 'test');
page()->fillField('Password', 'test');
page()->pressButton('Login');
expect(page())->toContainText('Hello test!');
});
});
});
示例15: config
<?php
/**
* Configurations for Doctrine.
*
* @var array
*/
return ['developer_mode' => config('app.environment') == 'development', 'model_paths' => [base('src/Models')], 'proxy_path' => base('src/Proxies')];