blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
116
path
stringlengths
2
241
src_encoding
stringclasses
31 values
length_bytes
int64
14
3.6M
score
float64
2.52
5.13
int_score
int64
3
5
detected_licenses
listlengths
0
41
license_type
stringclasses
2 values
text
stringlengths
14
3.57M
download_success
bool
1 class
97c471d90189d73264c131ab02415bc407a8f71c
PHP
touzilk/hp
/core/Request.php
UTF-8
2,001
2.875
3
[ "Apache-2.0" ]
permissive
<?php namespace core; class Request { private $_params; /** * 获取命令行参数 * @author beytagh * @return array|null */ public function getParams() { if ($this->_params === null) { if (isset($_SERVER['argv'])) { $this->_params = $_SERVER['argv']; ...
true
0fed5794a356890cd41b84c63ae69f2609ad63af
PHP
xjchengo/wechat
/src/Service/Menu.php
UTF-8
1,700
2.734375
3
[ "MIT" ]
permissive
<?php namespace Xjchen\Wechat\Service; class Menu extends AbstractService { const MENU_URL = 'https://api.weixin.qq.com/cgi-bin/menu/{$action}?access_token={$accessToken}'; const MENU_INFO_URL = 'https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token={$accessToken}'; public function crea...
true
ff7a60ba7e1cf9253eb08064ab6d0254d1ecba4a
PHP
arobertov/PHP_Web
/8.OOP Basic - EXERCISES/6.Raw data/Car.php
UTF-8
395
3.0625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Angel * Date: 1.10.2017 г. * Time: 21:40 */ class Car { public $model; public $engine; public $cargo; public $tires; public function __construct(string $model,Engine $engine,Cargo $cargo,array $tires) { $this->model = $model; $this->engine = $...
true
2ecfe8412915f9fa30bfdaf975229a986ffee90f
PHP
SahanaUmashankar/Project2_Final
/core/database/collection.php
UTF-8
1,361
3.171875
3
[]
no_license
<?php namespace database; //use DbConnection; use \PDO; abstract class collection { //getting model for the table static public function create() { $model = new static::$modelName; return $model; } //function for db statements execution static public function execute($sq...
true
694efc0bb45c16b416d39b9b5da511b4ae11fc41
PHP
juliobarreraa/jornadas
/modules/mod_jornadas/jornadas/iJornadasDB.php
UTF-8
575
2.671875
3
[]
no_license
<?php interface iJornadasDB { /** * Devuelve listado de equipos * @param int $team_id Si se pasa este parámetro se devuelve el equipo * @return Teams */ function getJornadaTeams($jornada_id = null); /** * Devuelve listado de Jornadas * @param int $jornada_id si se pasa devuelve la joranda con identific...
true
e61a7c4f982af2eb498b7db96954c848f33e4d0d
PHP
Yans88/icolor
/application/libraries/Validation.php
UTF-8
834
2.578125
3
[]
no_license
<?php class Validation{ protected $ci; public function __construct() { $this->ci =& get_instance(); $this->ci->load->model('Api_m'); } function check_exist($table=null, $where=null, $val=null, $user_id=null){ $err['username'] = ['err_code' => '02', 'err_msg' => 'Username has registered']; $err['emai...
true
726eee90e3938c914d4421a65d55e6ca0b37753a
PHP
agussetiadi/realtime_chat_ratchet
/chat-history.php
UTF-8
852
2.609375
3
[ "MIT" ]
permissive
<?php ?> <!DOCTYPE html> <html> <head> <title>Login</title> <link rel="stylesheet" type="text/css" href="bootstrap.min.css"> </head> <body> <div class="container"> <div class="col-md-10"> <h1 class="text-center">Chat Member</h1> <?php session_start(); $session_id = $_SESSION['user']; $db = ...
true
e9c6ebcffc8549ef38c43177cf9f304e0d80765c
PHP
weinbergdavid/assembly2turingmachine
/PHP/getProgram.php
UTF-8
904
2.5625
3
[ "Apache-2.0" ]
permissive
<?php /* * send to client specific assembly program. */ session_start(); if(!isset($_SESSION) || !isset($_SESSION["userName"])) { echo 'you must login'; return ; } $userName = $_SESSION["userName"] ; $programID=$_GET["id"]; /*if(strpos($programID,"'") !== null || strpos($programID,";") !== null || strpos(strtolow...
true
62b0442ae57251e9a3491dae37378705c8c1234d
PHP
ebsp/resting
/src/Validation/Secondary/Numeric/DecimalCountValidator.php
UTF-8
1,920
3.0625
3
[]
no_license
<?php namespace Seier\Resting\Validation\Secondary\Numeric; use Seier\Resting\Validation\Secondary\Panics; use Seier\Resting\Validation\Secondary\SecondaryValidator; class DecimalCountValidator implements SecondaryValidator { use Panics; private ?int $minDecimals; private ?int $maxDecimals; publ...
true
4cb791fc4b029c4e0a946902632d0f05d98a5cc6
PHP
redcrix/zend-php
/module/API/src/V1/Rpc/LoadCountryPrices/LoadCountryPricesController.php
UTF-8
3,260
2.59375
3
[]
permissive
<?php namespace API\V1\Rpc\LoadCountryPrices; use Zend\Mvc\Controller\AbstractActionController; use API\V1\Entity\CountryPrice; /** * RPC para recuperar valores por países e moedas * * @author Marcus Borges <yahuchanam@gmail.com> * @copyright (c) 2019, InetPet * @version 1.0.0 */ class LoadCountryPricesContro...
true
a8d8cefb376849143a0613c8eb0588c17661725e
PHP
KinacOelio/POS-system
/queries.php
UTF-8
2,744
2.890625
3
[]
no_license
<?php //instantiating the PDO define('DBHOST', 'localhost'); define('DBNAME', 'pos'); define('DBUSER', 'root'); define('DBPASS', ''); define('DBCONNSTRING','mysql:host='.DBHOST.'; mysql:dbname='.DBNAME.'; charset=utf8mb4;'); $pdo = new PDO(DBCONNSTRING,DBUSER,DBPASS); $pdo -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRM...
true
7df188bbf6b8a7c75cffea85dc0d4524cff13ccb
PHP
arturasmateika/skebby-rest-client
/lib/Client/Client.php
UTF-8
9,365
2.59375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Fazland\SkebbyRestClient\Client; use Fazland\SkebbyRestClient\Constant\Charsets; use Fazland\SkebbyRestClient\Constant\EncodingSchemas; use Fazland\SkebbyRestClient\Constant\Endpoints; use Fazland\SkebbyRestClient\Constant\Recipients; use Fazland\SkebbyRestClient\Constant\Send...
true
03ae018dcea8c1528e0b6a9b8fb7fe7cf243b619
PHP
mattiabasone/PagOnline
/src/XmlEntities/Traits/EntityAttributes.php
UTF-8
1,390
2.90625
3
[ "BSD-3-Clause" ]
permissive
<?php namespace PagOnline\XmlEntities\Traits; use PagOnline\XmlEntities\XmlEntityInterface; /** * Trait EntityAttributes. */ trait EntityAttributes { /** * Attributes that are classes * array['attributeName']['type'] = 'scalar|array' * array['attributeName']['namespace'] = \PagOnline\XmlEntities...
true
7db7111bd9096074a02d053e5da1cb773b779fc3
PHP
lrnflx/openAg
/src/Entity/Plant.php
UTF-8
2,354
2.65625
3
[]
no_license
<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\PlantRepository") */ class Plant { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(typ...
true
dfe54bb04be57e9c7677d3db74af109e851bb2dd
PHP
almamaka/php_gyak
/php/alapok_session_szuperglob/php alapok/feladat.php
UTF-8
1,427
3.171875
3
[]
no_license
<?php //1. feladat: osztáylozó rendszer - adott pnotszámhoz milyen eredmény tartozik pl ha a pont kisebb mnit 10 akkor az elégtelen $pont = 50; if($pont < 0 || $pont > 50){ echo "A pontszámnak 0 és 50 között kell lennie!"; } else if($pont < 20){ echo "Elégséges"; } else ...
true
a59eb7c983be0906b9da7914daa564c4c4f163ab
PHP
NateHuangHao/ProxyPool
/index.php
UTF-8
928
2.671875
3
[]
no_license
<?php $redis = new \Redis(); $redis->connect('127.0.0.1', '6379'); //随机获取单个ip if ($_SERVER['REQUEST_URI'] == '/get') { $ip = $redis->srandmember('ip_pool'); $result = [ 'data' => $ip ]; echo json_encode($result); } //获取全部ip else if ($_SERVER['REQUEST_URI'] == '/get_all') { $ip_pool = $redis->smembers('ip_pool')...
true
316fe9a1981a821729845999fe7648a4e42ac04c
PHP
paywithiota/paywithiota
/app/helpers.php
UTF-8
128
2.640625
3
[]
no_license
<?php /** * Print data * * @param $data */ function pr($data) { echo '<pre>'; print_r($data); echo '</pre>'; }
true
7a4552bbec0649c52e999a5dde0eda0411e7cfad
PHP
ClaudieFaukan/Exercice-POO
/POO5/vehicule.php
UTF-8
2,597
3.3125
3
[]
no_license
<?php require_once('VehiculeException.php'); class Vehicule { CONST VITESSE_MAX_AUTORISEE=130; private $nbPlaces; private $nbOccupants; private $vitesse=0; public function __construct(int $nPlace, int $nOccupants){ $this->nbPlaces=$nPlace; ...
true
6dad2b1eed2f59d15d4efb67456d7c84cbf87543
PHP
jtstacruz/APC_webprog_SS152_test_repo_jtstacruz
/excercise5/edit_data.php
UTF-8
6,291
2.828125
3
[]
no_license
<?php include_once 'dbconfig.php'; if(isset($_GET['edit_id'])) { $sql_query="SELECT * FROM users WHERE user_id=".$_GET['edit_id']; $result_set=mysql_query($sql_query); $fetched_row=mysql_fetch_array($result_set); } $Error = $nameErr = $emailErr = $genderErr = $websiteErr = ""; if(isset($_POST['btn-update'])){ ...
true
8d0cf1a291dfffe159764f5c02820133c29d10b6
PHP
tpedretti/Community-College
/CIS-12 - PHP Dynamic Web Site Program/Homework/classes/apple.php
UTF-8
361
3.515625
4
[]
no_license
<?php function hereisafunction() { } class apple { //put your code here public $color; protected $color2; private $color3; public function mymethod() { $this->color2 = "Some color"; $this->color3 = "some other color"; } } $a = new apple(); $a->myme...
true
b445d426d0cbb29d269164d9b9ad94c6831fb32a
PHP
nirvana-info/old_bak
/hawaiicustoms/.svn/pristine/24/24ae5aca51ed3bc816caca186d427336060388ea.svn-base
UTF-8
7,915
2.640625
3
[]
no_license
<?php /** * Google AdWords addon for Interspire Shopping Cart * The Google AdWords addon allow you to automatically generate Google AdWords ads for all products * in your store, complete with unique URLs, product titles and ad text. These can then be imported * into Google AdWords to advertise your store alongsid...
true
0d1acc7fbfd1c6debe7c13e3e924bac2a7b08620
PHP
imwyw/php
/src/ComponentDemo/ValidateCodeDemo/ValidateAction.php
UTF-8
250
2.53125
3
[ "Apache-2.0" ]
permissive
<?php session_start(); $valid_code = $_POST["ValidCode"]; if (isset($valid_code) && isset($_SESSION["validcode"])) { if ($valid_code == $_SESSION["validcode"]) { echo "验证成功"; } else { echo "验证失败"; } } ?>
true
1cc2559708080c1dcf7a0b4a89a61df4a07e9d32
PHP
KlausBacker/anakeen-platform-4
/test-tools/src/vendor/Anakeen/TestTools/Routes/SmartElementUpdate.php
UTF-8
3,382
2.53125
3
[]
no_license
<?php namespace Anakeen\TestTools\Routes; use Anakeen\Core\SmartStructure\SmartFieldValueException; use Anakeen\Router\ApiV2Response; use Anakeen\Router\Exception; use Anakeen\SmartElement; use Anakeen\SmartElementManager; class SmartElementUpdate { /** @var SmartElement $smartElement */ protected $smartElem...
true
4623c409c75fe556f1688bad9b361106b42f7464
PHP
khiemhuuhieu/php_mvc.github.io
/classes/category.php
UTF-8
2,868
2.796875
3
[]
no_license
<?php $filepath=realpath(dirname(__FILE__)); include_once ($filepath.'/../lib/database.php'); include_once ($filepath.'/../helper/format.php'); ?> <?php /** * */ class category { private $db; private $fm; public function __construct() { $this->db = new Database(); $this->fm = new Format(); }...
true
f4c4b83b4abbcb9711e5a5957f70bf0201547f91
PHP
daxiaobuzhaodiao/shop
/database/seeds/ProductsSeeder.php
UTF-8
933
2.875
3
[]
no_license
<?php use Illuminate\Database\Seeder; use App\Models\Product; use App\Models\ProductSku; class ProductsSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { DB::statement('SET FOREIGN_KEY_CHECKS = 0'); Product::truncate(); ...
true
94b5fb617efca5fc679693874d26608be1e9a301
PHP
5ctechforgood/projectcaring
/wp-content/plugins/give/includes/admin/tools/class-settings-system-info.php
UTF-8
1,760
2.625
3
[ "GPL-1.0-or-later", "LicenseRef-scancode-free-unknown", "GPL-3.0-only", "MIT" ]
permissive
<?php /** * Give Settings Page/Tab * * @package Give * @subpackage Classes/Give_Settings_System_Info * @copyright Copyright (c) 2016, WordImpress * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.8 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed ...
true
55ee33a76f4b132323b4d683dd59e265a3dc85b3
PHP
PedroBSanchez/albuns-php
/src/app/Login.php
UTF-8
1,413
2.765625
3
[]
no_license
<?php namespace App; class Login extends LayoutAbstract { public function login() { if (count($_POST) == 0) { return []; } if (!isset($_POST['email']) or !isset($_POST['senha'])) { return [ 'erro' => 'Email e Senha são obrigatórios' ]...
true
c029aef8dfe79e724db8777074432632d1436901
PHP
super-dev-0113/okeicom
/app/Models/EmailVerification.php
UTF-8
2,496
2.890625
3
[]
no_license
<?php namespace App\Models; use Carbon\Carbon; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class EmailVerification extends Model { use HasFactory; const EXPIRATION_HOURS = 1; // 有効期限のデフォルト(時間) const STATUS_SEND_MAIL = 0; // 仮会員登録のメール送信 const STA...
true
e29fe82ce505fba40e37040db568d215d256cb18
PHP
visb/prog4fun-server
/app/models/BaseModel.php
UTF-8
653
2.84375
3
[]
no_license
<?php class BaseModel extends Eloquent { protected static $rules = []; protected static $messages; public static function validate($input = []) { $validator = Validator::make($input, static::$rules); if ($validator->fails()) { static::$messages = $validator->messages(); return false; ...
true
cec28f595e4e465d609298a6a69e8c8dc55f4a68
PHP
xiaopz2019/erp_opensource
/eagle/models/SaasEbayAutosyncstatus.php
UTF-8
1,753
2.515625
3
[ "Apache-2.0" ]
permissive
<?php namespace eagle\models; use Yii; /** * This is the model class for table "saas_ebay_autosyncstatus". * * @property string $id * @property string $selleruserid * @property integer $ebay_uid * @property integer $type * @property integer $status * @property integer $status_process * @property integer $la...
true
11e183a802fd0f3dde477043834cb1dbd395a3f6
PHP
AM54-DevWeb/Divers
/formConnexion/connexion.php
UTF-8
1,843
2.765625
3
[]
no_license
<?php //On commence une session et on se co à notre BDD session_start(); require_once 'connexion_bdd.php'; //On vérifie que les champs sont remplis if(!empty($_POST['pseudo']) && !empty($_POST['password'])){ //Permet de sécuriser les données ? A vérifier(faille) $pseudo = ...
true
3bd16b8dc8ecbcb52af77183775a6e2fd80bb881
PHP
bravo3/workflow
/src/Bravo3/Workflow/Events/PollingEvent.php
UTF-8
558
2.703125
3
[]
no_license
<?php namespace Bravo3\Workflow\Events; use Bravo3\Workflow\Flags\FlagInterface; use Symfony\Component\EventDispatcher\Event; /** * Occurs between a daemon polling, giving an opportunity to abort */ class PollingEvent extends Event { /** * @var FlagInterface */ protected $abort_flag; public f...
true
4ea4de7fc7706a8fb3b1cee86fb4df08d98f9daf
PHP
surajrana52/car-inventory
/src/classes/manufacturer.class.php
UTF-8
752
3.125
3
[]
no_license
<?php require __DIR__ . '/../database.php'; class Manufacturer { private $db; public function __construct($DB_con) { $this->db = $DB_con; } /** * @param $mfgName * @return bool */ public function addNewManufacturer($mfgName) { try{ $stmt = $...
true
72d6a5876eab00ac8ae4f8f0d690dd5506bc70b8
PHP
Ocramius/Storm
/Storm/Storm/Drivers/Base/Relational/Queries/ExpressionCompiler.php
UTF-8
6,546
2.6875
3
[]
no_license
<?php namespace Storm\Drivers\Base\Relational\Queries; use \Storm\Core\Relational\Expressions as CoreE; use \Storm\Drivers\Base\Relational\Expressions as E; use \Storm\Core\Relational\Expressions\Expression; abstract class ExpressionCompiler implements IExpressionCompiler { private $ExpressionOptimizer; publ...
true
50e1b8dd4948ac64c3a1e638c17ffc0c78c713eb
PHP
mofesolapaul/bitwise-operators
/tests/PermissionTest.php
UTF-8
1,887
2.703125
3
[]
no_license
<?php use App\Permission; use PHPUnit\Framework\TestCase; /** * Created by Mofesola Banjo. * User: mb-pro-home * Date: 2019-12-02 * Time: 17:27 */ class PermissionTest extends TestCase { /** * @var Permission $permission */ static $permission; public static function setUpBeforeClass(): voi...
true
8fd1838c02d07b0176adf7a4ec98ba5b397a0217
PHP
Max1mus7/CollegeYears
/Eclipse-related Schoolwork (Java and PHP)/Topic 1-2/Tire.php
UTF-8
325
3.109375
3
[]
no_license
<?php error_reporting(E_ALL); ini_set('display_errors', 1); class Tire { private $psi; public function __construct() { $this->psi = 32; } public function getPSI() { return $this->psi; } public function setPSI($newPSI) { $this->psi = $newPSI; } ...
true
7bc19e5fd64d7cc6e9fa65616279965e83fa0441
PHP
Adalynn/ecomm
/landit/functions.php
UTF-8
14,555
2.59375
3
[]
no_license
<?php include "env_functions.php"; function dbConnOld() { $host="localhost"; $user="root"; $password="root"; mysql_connect($host,$user,$password); $database_name="landit"; $db=mysql_select_db($database_name); if (!$db) { return false; } else { return true; } } function getUserData($by_col, $value) { $co...
true
ea1a5932466b894d833ff2c0558a6b90627a70d0
PHP
sakovets/phpobjects
/app/models/Poster.php
UTF-8
1,150
2.96875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Asus * Date: 20.09.2018 * Time: 10:08 */ require_once 'base.php'; require_once 'IInfo.php'; require_once 'Size.php'; class Poster extends Base implements IInfo{ public $type; public $series; public $size = array(); public function __cons...
true
ee3f84e7ca30646e13a5705e165689f3a6da5de4
PHP
khubaibshah/Dissertation
/funvalley/crud2/add.php
UTF-8
4,835
2.796875
3
[]
no_license
<html> <head> <title>Add Data</title> </head> <body> <?php //including the database connection file include_once("db_connect.php"); if(isset($_POST['Submit'])) { $partydate = $_POST['partydate']; $partytime = $_POST['partytime']; $partybag = $_POST['partybag']; $partyfoodselection1 = $_POST['part...
true
dc9a398d08a537d766f39cbb93b536ed42319ea8
PHP
uhback/php-gmhealth
/emailconfirm.php
UTF-8
1,794
2.796875
3
[]
no_license
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Email Confirm</title> </head> <body> <?php $username = $_GET['username']; $code = $_GET['code']; // create connection require_once './config.php'; // create connec...
true
f2f4d94987f13140467610a73259a5c43925cb5f
PHP
kamogawa/laravel_sample
/app/Http/Controllers/BoardController.php
UTF-8
2,954
2.515625
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\BoardUser; use App\Models\BoardContents; class BoardController extends Controller { public function loginForm() { return view('board.contents.login'); } public function loginUser(Request $request) { $email ...
true
322ed97f25b1573f717e28f5ef4e56a4b2f5b13f
PHP
rachelkhoriander/tech-task
/source/callback.php
UTF-8
347
2.65625
3
[]
no_license
<?php session_start(); require "access_gh.php"; //Use code to get access token, then fetch user data from GitHub. fetchData(); //If session is empty, redirect to index page, so user can log in. if (!isset($_SESSION['user'])) { header("location: index.php"); } //Else redirect to main page. else { header("l...
true
bb3fa000b453bd48423364820e8b70186888d76d
PHP
a1comms/php-gds
/examples/datetime_binding.php
UTF-8
1,651
3.109375
3
[ "Apache-2.0" ]
permissive
<?php /** * Query parameter examples - datetime bindings * * @author Tom Walder <twalder@gmail.com> */ require_once('boilerplate.php'); // Schema with datetime $obj_task_schema = (new GDS\Schema('Task')) ->addString('title') ->addDatetime('due', TRUE); // Store requires a Gateway and Schema $obj_task_stor...
true
407e8b99cdf90134bcc5e81d329b1d0b904256ef
PHP
RizkiHerdaID/infogue
/app/Message.php
UTF-8
5,252
2.609375
3
[ "MIT" ]
permissive
<?php namespace Infogue; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; class Message extends Model { /** * One-to-many relationship, retrieve conversations by message. * * @return \Illuminate\Database\Eloquent\Relations\HasMany ...
true
f5d0993395092a3a54f3794eb7912ab27f2a3b78
PHP
netzlabor-coding-gmbh/nl_dmailsubscription
/Classes/Domain/Model/Address.php
UTF-8
5,685
2.609375
3
[]
no_license
<?php namespace NL\NlDmailsubscription\Domain\Model; use TYPO3\CMS\Core\Crypto\Random; use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Class Address * @package NL\NlDmailsubscription\Domain\Model */ class Address extends \FriendsOfTYPO3\TtAddress\Domain\Model\Address { /** * @var string * @TYPO3\CM...
true
4db11a9f629b1e2ce34f019b8e00842a013efda0
PHP
amirkheirabadi73/modules
/src/Pingpong/Modules/Handlers/ModuleModelHandler.php
UTF-8
3,034
2.765625
3
[ "MIT" ]
permissive
<?php namespace Pingpong\Modules\Handlers; use Illuminate\Support\Str; use Pingpong\Modules\Module; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; /** * Class ModuleModelHandler * @package Pingpong\Modules\Handlers */ class ModuleModelHandler { /** * @var Module */ protect...
true
bfa3905b547606f8a31ca314a8d300f3bc0cb61c
PHP
Cbermudez98/visualesWeb
/controlador/controladorDefecto.php
UTF-8
997
2.640625
3
[]
no_license
<?php require_once('../db/db.php'); class controladorDefecto{ private $db; public function __construct(){ $this->db = Conexion::conectar(); } public function getDefectos($tipoVehiculo){ try { $query = $this->db->prepare('SELECT * FROM def...
true
63a68fa3e63dd2560951ea39c0d26bc118a79402
PHP
preetikrish19/codher_2021
/customer/addcart.php
UTF-8
1,150
2.578125
3
[]
no_license
<?php session_start(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { include('db.php'); $prodname = $con->real_escape_string($_POST['prod_name']); $orgname = $con->real_escape_string($_POST['org_name']); $noi = $_POST['noi']; $price = $_POST['prod_price']; //echo $price.' '.$noi; $price = $price * $noi; ...
true
b7b9f29f5d7e558661016da2fc4549f4096068aa
PHP
mabn17/oophp-v4
/src/Dice/DiceHand.php
UTF-8
2,411
3.796875
4
[]
no_license
<?php namespace Mabn\Dice; /** * A dicehand, consisting of dices. */ class DiceHand { /** * @var Dice $dices Array consisting of dices. * @var int $values Array consisting of last roll of the dices. * @var int $points consisting of last roll of the dices. */ private $dices; pri...
true
d669168cc9601f5ed817c8c393875327a9198639
PHP
alexpts/php-mutable-psr7
/tests/unit/Factory/Psr17FactoryTest.php
UTF-8
3,305
2.5625
3
[]
no_license
<?php declare(strict_types=1); use PHPUnit\Framework\TestCase; use PTS\Psr7\Factory\Psr17Factory; use PTS\Psr7\Stream; class Psr17FactoryTest extends TestCase { public function testCreateResponse(): void { $factory = new Psr17Factory; $r = $factory->createResponse(200); static::assertS...
true
da172e889df2ad705aa7d45db9c768ba74d28289
PHP
MasayukiBernard/GCWebsite-Local
/app/Http/Middleware/CheckIsStaff.php
UTF-8
527
2.75
3
[]
no_license
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; class CheckIsStaff { /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $nex...
true
fbb82bbc2a64b07d2e37e378d64a2c1cc94ba047
PHP
goldjay/npodatabase
/addPeople.php
UTF-8
1,016
2.765625
3
[ "MIT" ]
permissive
<?php //Turn on error reporting ini_set('display_errors', 'On'); //Connects to the database $mysqli = new mysqli("oniddb.cws.oregonstate.edu","steingoj-db","wvzjVzjt5Wo41kWh","steingoj-db"); if($mysqli->connect_errno){ echo "Connection error " . $mysqli->connect_errno . " " . $mysqli->connect_error; } if(!...
true
725a1fc5285766270b4cbb1a47a01a961523b005
PHP
slhenryy/v.shipinbaoku.com
/common/models/PlayUrl.php
UTF-8
1,603
2.625
3
[]
no_license
<?php namespace common\models; use Yii; /** * This is the model class for table "play_url". * * @property int $id * @property string|null $play_title * @property string|null $play_from * @property string $play_url * @property string $play_url_aes 将url生成唯一字符串 * @property string $url_id 关联vod_detail url_id * ...
true
af958b1c932eadce69ce66555e5f0fae60d7f4a5
PHP
kevinfluit99/tostitijd2
/login.php
UTF-8
1,830
2.640625
3
[]
no_license
<?php require_once "include/include.php"; if(isset($_POST['but_submit'])){ $uname = ($_POST['txt_uname']);//txt_uname is de username uit de form $password = ($_POST['txt_pwd']);//txt_pwd is het wachtwoord uit de form // hier wordt gekeken of je wel iets ingevoerd hebt. if ($uname != "" && $password != "...
true
4b7a2b2be672a0edd272a605a936f312d7fbfc54
PHP
qitsuk/VRmart
/VR/php/db_factory.php
UTF-8
364
2.53125
3
[]
no_license
<?php $dbc = mysqli_connect("mysql79.unoeuro.com", "qitsuk_dk", "19qItSuKsUnOEuRo87", "qitsuk_dk_db2", '3306'); if ($dbc->connect_errno) { printf("Connection failed: %s\n", $dbc->connect_error); exit(); } /* change character set to utf8 */ if (!$dbc->set_charset("utf8")) { printf("Error loading character s...
true
1de7f81fd8d94c12198d167a1a470baa327e0f0f
PHP
peta-hikari/lesson_blog
/model/loginData.php
UTF-8
479
3.046875
3
[]
no_license
<?php class LoginData { protected $login_items = ['mail', 'pass']; protected $login_datas = []; function __construct(){ foreach($this->login_items as $key){ $this->login_datas[$key] = ""; } } public function setData($data, $key){ $this->login_datas[$key] = $da...
true
d06627fa47ae9d3504ed10fa48fb53e8813bad25
PHP
FXXDEV/LPGII-Laravel
/crud-cidade-estado/app/Http/Controllers/StateController.php
UTF-8
1,761
2.5625
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\State; class StateController extends Controller { public function __construct() { $this->middleware('auth'); } public function index() { $states = State::all(); return view('States/index', [...
true
0e057602b7877c31a3b91e1e85f4e49e2da5b580
PHP
devqx/med
/classes/DAOs/PatientProcedureMedicalReportDAO.php
UTF-8
4,707
2.734375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: robot * Date: 11/3/15 * Time: 11:18 AM */ class PatientProcedureMedicalReportDAO { private $conn = null; function __construct() { try { require_once $_SERVER ['DOCUMENT_ROOT'] .'/Connections/MyDBConnector.php'; require_once $_SERVER ...
true
5284f7811b438605459eae2f11029ece07f928dc
PHP
soki/tinyphp
/src/helpers.php
UTF-8
612
2.578125
3
[]
no_license
<?php use Illuminate\Container\Container; use TinyPHP\Http\Response; function app($make = null, $parameters = []) { if (is_null($make)) { return Container::getInstance(); } return Container::getInstance()->make($make, $parameters); } function config($key = null, $default = null) { $v = app()...
true
2790d5269d8ef1821de3821158b1f3671d5bdf3c
PHP
KiceSanders/moxee-coding-challenge
/api/chat_room.php
UTF-8
1,232
3.25
3
[]
no_license
<?php class chat_room { public function __construct($mysqli) { $this->mysqli = $mysqli; } /** * @return array of all chat rooms */ public function read($arguments) { $chat_rooms = array(); $query = ' select * from `chat_room` ' ; $result = $t...
true
ab02efb01edbb2c57e03fe7ab6cd421b2f7ebd3b
PHP
robinschiro/GTASS
/www/controller/nominatorController.php
UTF-8
5,546
2.8125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: sammy * Date: 3/31/2016 * Time: 9:34 PM */ require_once('../model/implementation/emailServiceImp.php'); require_once('../model/implementation/sessionServiceImp.php'); require_once('../model/implementation/userServiceImp.php'); require_once('../model/implementation/nominat...
true
bfdf365540121ea8acd4e8c04bbe31469e46e725
PHP
HeyzzWatcharin/CLBS-DEMO
/components/operation.php
UTF-8
1,365
3.046875
3
[]
no_license
<?php require_once("db.php"); require_once("components.php"); $con = Createdb(); // create button click if (isset($_POST['create'])) { createData(); } function createData() { $firstName = userValue("first_name"); $lastName = userValue("last_name"); $email = userValue("email"); $telephone = userV...
true
a44d3d044989e5b1cc0f8948f1736fdd2419db86
PHP
ess/pdnsadministrator
/lib/tar.php
UTF-8
13,443
2.8125
3
[]
no_license
<?php /** * PDNS-Admin * Copyright (c) 2006-2011 Roger Libiez http://www.iguanadons.net * * Based on Quicksilver Forums * Copyright (c) 2005-2011 The Quicksilver Forums Development Team * http://code.google.com/p/quicksilverforums/ * * This program is free software; you can redistribute it and/or * modify it...
true
4def43382cad4549090de2e01a025d98edf72306
PHP
NikolaLukic94/CMS-in-PHP
/inludes/mysql.inc.php
UTF-8
537
2.71875
3
[]
no_license
<?php DEFINE ('DB_USER', 'root'); DEFINE ('DB_PASSWORD', ''); DEFINE ('DB_HOST', 'localhost'); DEFINE ('DB_NAME', 'new'); $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // make data safe to use in queries - escaping /* removes extra slashes in magic quotes is enabled trims extra spaes from the data r...
true
18ca1aee9b91cee11d01bedcb3f5953c3d1684cc
PHP
JALlucia/travels
/data/data.php
UTF-8
1,606
2.625
3
[]
no_license
<?php /* $cities=['Logroño','Zaragoza','Teruel','Madrid','Lleida','Alicante','Castellón','Segovia','Ciudad Real']; $connections=[[0,4,6,8,0,0,0,0,0], [4,0,2,0,2,0,0,0,0], [6,2,0,3,5,7,0,0,0], [8,0,3,0,0,0,0,0,0], [0,2,5,0,0,0,4,8,0], [0,0,7,0,0,0,3,0,7], [0,0,0,0,4,3,0...
true
338477f9714ffcfa1ff166ed9f7859deb0436a16
PHP
rick1992/Petrocredito
/includes/qcubed/controls/QActivityFeed.class.php
UTF-8
4,462
2.65625
3
[ "MIT" ]
permissive
<?php /** * Description of QActivityFeed * * @author Harold */ class QActivityFeed extends QPanel { public $upload_path; public $user; public $arrayActivityFeed; public function __construct($objParentObject, $strControlId = null, $idUser = null) { parent::__construct($objParentObject, $st...
true
925c85d9d77ab47835cfc3ee844a5e8c26d8c3b9
PHP
epolish/diploma-back
/application/core/MY_Controller.php
UTF-8
2,269
2.671875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * Class MY_Controller * Advanced general controller, which can operate with logs. * * @param $file * @property CI_URI $uri * @property Aauth $aauth * @property CI_Input $input * @property CI_Router $router * @author Eugene Polischuk <eugene.polischuk@eleanorsoft.com> * @copyright Copyright (c) 2017...
true
c95c96dbd1d8ddb885118caee2bfdf390cb4345b
PHP
JessePot24/Forum_
/forum/src/autoforum/register.php
UTF-8
1,583
2.796875
3
[]
no_license
<?php include "includes/db.php"; include "includes/navbar.php"; try { if (isset($_POST['register'])) { $username = $_POST['usernamer']; $email = $_POST['email']; $real_name = $_POST['real_name']; $password = md5($_POST['passwordr']); $query = "INSERT INTO users ...
true
300760e64274509d733dacab95349b74890eb5b4
PHP
danielsatiro/quero_educacao
/app/Models/Talk.php
UTF-8
662
3.171875
3
[]
no_license
<?php namespace App\Models; class Talk { use GetAttributes; private $title; private $minutes; const LIGHTNING_STR = 'lightning'; const LIGHTNING_MIN = 5; public function __construct(string $title) { $this->title = trim($title); $this->minutes = $this->getTitleMinutes();...
true
303d862a5daf353ebade75954ea2418898356d05
PHP
fadykstas/laravel-basket
/app/Actions/Basket/GetBasketList/GetBasketListResponse.php
UTF-8
374
2.625
3
[ "MIT" ]
permissive
<?php namespace App\Actions\Basket\GetBasketList; use App\Entities\Basket; use Illuminate\Support\Collection; class GetBasketListResponse { private $baskets; public function __construct(Basket ...$baskets) { $this->baskets = Collection::make($baskets); } public function getBaskets(): Co...
true
e7b8b0fc4ead86e8416d83ef31366e3c4fbfc724
PHP
swyxio/temporal-java-workshop
/notifyuserphp/vendor/temporal/sdk/src/Exception/CompensationException.php
UTF-8
665
2.59375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * This file is part of Temporal package. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Temporal\Exception; class CompensationException extends TemporalException { /** * @var...
true
734d4d8285e254509ce14950ed25440b2ea7dbc5
PHP
tanguiming/user
/src/Http/Models/UserCenter.php
UTF-8
2,783
2.734375
3
[]
no_license
<?php /** * UserCenter * @object 用户中心后台方法配置 * @author 原版lq 现版kxl * @date 2015-8-13 * @version 1.0 */ namespace Weitac\User\Http\Models; use Illuminate\Database\Eloquent\Model; class UserCenter extends Model { protected $table = 'user_center'; protected $primaryKey = 'id'; pr...
true
e59750e2f6e3d78421fa721647954a8e0c5603f8
PHP
DJBoxer/Torrent-Trader-MVC-PDO-OOP
/upload/classes/Cookie.php
UTF-8
442
2.765625
3
[]
no_license
<?php class Cookie { // a classical static method to make it universally available public static function destroy() { setcookie("PHPSESSID", null, time() - 7000000, "/"); $_SESSION = array(); unset($_SESSION); @session_destroy(); } public static function set() {...
true
eeedf09dc21d571f1338fc01a68758d0d043289e
PHP
a19860101/php20200414
/upload/index2.php
UTF-8
1,144
2.65625
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> table,td,th { border: 1px solid #666; border-collapse: collapse; padding: 5px; } <...
true
11a2a3092063d228c3265c294340bcb1cfbee569
PHP
yorizpra/Obatin
/app/Http/Controllers/API/ApiKonsumenController.php
UTF-8
3,163
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\API; use App\Http\Controllers\Controller; use App\Konsumen; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; class ApiKonsumenController extends Controller { public function getkonsumenAll() { $konsumen = Konsumen::get()->toJson(JSON_PRETTY_PRINT...
true
97d604a7fdc650a7da97b4752d4fd22bd0ed570b
PHP
jamsheedkhalid/wps
/createAdmin.php
UTF-8
4,304
2.578125
3
[]
no_license
<?php session_start(); include('header.php'); include('config/dbConfig.php'); $success = $fail = $useravailable = 0; if (!isset($_SESSION['token']) || !isset($_SESSION['admin'])) { $_SESSION['login'] = 1; echo '<script> location.replace("index.php"); </script>'; } if (!isset($_SESSION['token'])) { header...
true
893779bde0e1f39e5658a9ca1be85beeee654778
PHP
wearelung/siig
/SIIG-portal-admin/admin/inc/inc.upload.php
ISO-8859-1
1,970
3.046875
3
[ "MIT" ]
permissive
<?php /** * Funo para upload de arquivo de imagem (JPG por enquanto) * - Recebe 4 parmetros: arquivo, destino, largura, algura */ function upload($origem, $destino, $lar, $alt) { $quality = 90; //qualidade (de 0 a 100) $wmax = $lar; //largura mxima $hmax = $alt; //altura mxima $source = imagecreatefromjpeg($ori...
true
8c5f09b50e527a8f725d577684bac623f7508f1b
PHP
Aloso/abiball
/createPassword.php
UTF-8
2,502
2.703125
3
[]
no_license
<?php session_start(); require_once 'resources/settings.inc.php'; if (!isset($_SESSION['loggedin']) || !isset($_SESSION['userID'])) { $error = 'Ungültige Anfrage'; include 'error_message.inc.php'; } include '_part1a.inc.php'; echo '<div id="content">'; if ($_SESSION['loggedin'] == 'createPassword') { $...
true
62cab494347c6a5271cdc0697dec32594afd4b44
PHP
BEOSMO/testjpa2018
/src/main/webapp/test2.php
ISO-8859-1
3,117
2.796875
3
[]
no_license
<div id="content" class="content"> Modifier un Article <?php $bdd = new PDO('mysql:host=anteros.istic.univ-rennes1.fr;dbname=base_16011592;charset=utf8', 'user_16011592', '051081912'); // toujours la connexion la base de donnes if(!isset($_GET['id'])) { header('Location: test.php'); // s...
true
f83deade43e0d9012767f3c41a1e378882272547
PHP
UTACSE5328/MavAppoint_PHP
/app/Views/testView.php
UTF-8
7,845
2.546875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Jarvis * Date: 2017/2/13 * Time: 17:25 */ use Models\Db as db; use Models\Login as login; use Models\Bean as bean; use Models\CompositeTimeSlot; $manager = new db\DatabaseManager(); echo "getStudentEmails</br>"; $res = $manager->getStudentEmails(); print_r($res);echo '...
true
2356904351c751534caf887b10c4630a25205575
PHP
nizaranand/pnddesign
/dev/chameleon-pro/functions/ft-ads-manager/inc/import.php
UTF-8
11,622
2.625
3
[]
no_license
<?php // Don't load directly if (!defined('ABSPATH')) { die('-1'); } /** * Import/Export Feature * * @package Includes * @subpackge Settings */ if (!class_exists('wp_adpress_import')) { /** * Import/Export Class */ class wp_adpress_import { /** * Message displayed to the ...
true
68a456973f0bea274b0694632eb4819f7a98d740
PHP
derrabus/phpbb-workshop
/tests/View/BBEncoderTest.php
UTF-8
3,859
2.671875
3
[]
no_license
<?php namespace App\Tests\View; use App\View\BBEncoder; use PHPUnit\Framework\TestCase; class BBEncoderTest extends TestCase { /** * @dataProvider provideFaqExamples */ public function testEncodeFaqExamples(string $source, string $expectedResult): void { $encoder = new BBEncoder(); ...
true
7303a6252904fe8887186238158c1e66674ed7ec
PHP
nanaadjoabentil/ecommerce
/lab9/php/productFunctions.php
UTF-8
13,399
3.03125
3
[]
no_license
<?php // include database file require_once("../admin/database/connect.php"); function allproducts() { // write query $sql = "SELECT product_id, product_image,product_title,product_price,product_desc FROM products ORDER BY RAND()"; //random selection order each time. // create new instance of database $connec...
true
e98614eb28290236c06ca5c4d090f09d46f8665f
PHP
gergo85/oc-news
/classes/NewsletterMail.php
UTF-8
545
2.625
3
[ "MIT" ]
permissive
<?php namespace Indikator\News\Classes; use October\Rain\Mail\Mailable; class NewsletterMail extends Mailable { public $template, $params, $receiver; public function __construct($template, $params, $receiver, $subject) { $this->template = $template; $this->params = $params; $thi...
true
cdb3d19caae1934bbfe415b9fb723656a409b576
PHP
Maxlab/UserBundle
/Form/DataTransformer/UserToUsernameTransformer.php
UTF-8
1,437
2.75
3
[]
no_license
<?php namespace Remg\UserBundle\Form\DataTransformer; use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\Exception\TransformationFailedException; use Remg\UserBundle\Repository\UserRepository; class UserToUsernameTransformer implements DataTransformerInterface { private $repository; ...
true
db12aba6f699dbba3a5e568966640157d485f41d
PHP
schlauerwolf/rest-modeling-framework
/raml-generic-generator/src/test/resources/AttributeModel.php
UTF-8
1,169
2.75
3
[ "MIT" ]
permissive
<?php /** * This file has been auto generated * Do not change it */ namespace Test\Types; use Test\Base\JsonObjectModel; class AttributeModel extends JsonObjectModel implements Attribute { /** * @var string */ private $name; /** * @var mixed */ private $value; /** * @...
true
976892c0b85f7716055e5f8bb22f6537b7af3fbd
PHP
akmcomau/openmvc
/core/classes/Hook.php
UTF-8
1,048
2.96875
3
[]
no_license
<?php namespace core\classes; use core\classes\URL; use core\classes\Request; use core\classes\Config; use core\classes\Logger; use core\classes\Database; class Hook { /** * The configuration object * @var Config $config */ protected $config; /** * The database object * @var Database $database */ p...
true
02228129e2c67ddaf0cd296c59bf920e5a19e8cb
PHP
xkid/Rojak-Engine
/examples/user.php
UTF-8
2,674
2.875
3
[]
no_license
<?php // Use this PHP File As your Development // **************** Default include **************** // include All file include_once('../all.php'); // New template engine object $TBS = new clsTinyButStrong; // Load Your HTML file $TBS->LoadTemplate('user.html'); // <----- Place this script ...
true
2a08862daab2c45f9d27062222ea05105abc3d72
PHP
xaraya/core
/html/code/modules/themes/xaradminapi/initialise.php
UTF-8
1,488
2.59375
3
[]
no_license
<?php /** * @package modules\themes * @subpackage themes * @copyright see the html/credits.html file in this release * @category Xaraya Web Applications Framework * @version 2.4.0 * @copyright see the html/credits.html file in this release * @license GPL {@link http://www.gnu.org/licenses/gpl.html} * @link http...
true
9593822c930c38efe73bbae45be38333361f2bd0
PHP
singhakansha/Tour-and-Travel
/showrecord.php
UTF-8
1,597
2.515625
3
[]
no_license
<?php session_start(); include 'blogic.php'; if(!isset($_SESSION['email'])) { header("location:login.php"); } ?> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body background="back.jpg"> <center> <table width='100%'> <tr> <td valig...
true
418dbd456b00f21656f78ec0153426523c3dd532
PHP
Grimston/phalcon-acl
/src/security/models/Resource.php
UTF-8
1,494
2.828125
3
[ "MIT" ]
permissive
<?php namespace Grimston\Security\Models; use Phalcon\Mvc\Model; use Phalcon\Mvc\Model\ResultInterface; use Phalcon\Mvc\Model\ResultsetInterface; class Resource extends Model { /** * * @var string */ protected $resource; /** * Method to set the value of field resource * * ...
true
46b51415d97eac0b0ce4b2d3a96b186995b28519
PHP
bonbers/Revisions-SQL
/exo/connexion.php
UTF-8
546
2.734375
3
[]
no_license
<?php function getResult($select){ $DB_HOST = "localhost"; $DB_USER = "root"; $DB_PASS = ""; $DB_NAME = "base_etudiants"; try{ $bdd = new PDO("mysql:host={$DB_HOST};dbname={$DB_NAME}",$DB_USER,$DB_PASS); $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $bdd->setAttr...
true
907af58729cbdf103ca74f9bc4ac37908241e9f4
PHP
dct2012/laminas-users
/src/php/src/Command/Admin/AdminCreateCommand.php
UTF-8
3,414
2.71875
3
[ "MIT" ]
permissive
<?php declare( strict_types = 1 ); namespace App\Command\Admin; use Exception, RuntimeException; use App\Functions as F; use App\Model\{Admin, Identity}; use App\Model\Values\IdentityFields as IFs; use App\Model\Helper\{AdminHelper, IdentityHelper}; use Laminas\Db\Adapter\AdapterInterface; use Symfony\Component\Cons...
true
81ce20f954606ab59b62c240cefddca5e3d33262
PHP
myantsevich/Cursovaya_stpis
/src/Adapters/Database/Doctrine/PartnersRepository.php
UTF-8
1,613
2.640625
3
[]
no_license
<?php namespace BelkinDom\Adapters\Database\Doctrine; use BelkinDom\DTO\Request\Common\Find; use BelkinDom\Store\Partner\Partners; use BelkinDom\Store\Partner\Partner; use BelkinDom\Store\Partner\PartnerNotFoundException; use BelkinDom\Store\Partner\PartnerUuid; use Pagerfanta\Pagerfanta; final class PartnersReposit...
true
f4f226a7e382a68a967af246d169441fa4959d62
PHP
diskjork/skeletobook
/_protected/backend/controllers/AvisoController.php
UTF-8
9,434
2.53125
3
[]
no_license
<?php namespace backend\controllers; use common\models\Aviso; use common\models\AvisoSearch; use common\models\Publicacion; use frontend\models\Confort; use frontend\models\Seguridad; use frontend\models\Multimedia; use frontend\models\Exterior; use yii\web\NotFoundHttpException; use yii\web\MethodNotAllowedHttpExcept...
true
969ac24adf5266bd80a0279388a2c168dc035ee9
PHP
scarlettperry/php-practice
/OOO/creating_classes.php
UTF-8
409
3.609375
4
[]
no_license
<?php class Dress { //properties and methods go here //visibility (public, private, protected) default is public public $color = "white"; public $fabric = "silk"; public $design = "loose"; } //camel case class DressPattern{ } //creating instances of an object $dress1 = new Dress(); $dress1->colo...
true
0b741d43c5b831893042b22c1042e1f04552ca83
PHP
eeatem/bookstore_system
/mysql_class.php
UTF-8
1,755
3.140625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: eeatem * Date: 2019-04-23 * Time: 16:00 * Func: 制作一个PHP+MySQL的类 */ require 'config.php'; class mysql { // 定义私有属性变量 private $host; private $user; private $password; private $charset; // 定义数据库连接语句 public $conn; // 初始化变量的方法 function __c...
true
aeef72c9a244f31485891ee7759b8acd37a2a404
PHP
jasny/social
/src/Social/Collection.php
UTF-8
3,564
3.09375
3
[]
no_license
<?php /** * Base class for Collections * * @license MIT * @copyright 2012-2014 Jasny */ /** */ namespace Social; /** * A collection of entities. */ class Collection extends \ArrayObject { /** * Social connection * @var Connection */ protected $_connection; /** * Request ob...
true
485289155139883cf6e183626823314ca6d7a3c2
PHP
vlecoq-v/Camagru
/model/likes.php
UTF-8
1,590
2.953125
3
[]
no_license
<?php class likes { public $count; public function is_liked($pic_id) { $db = $this->db_connect(); $sql = "SELECT * FROM likes WHERE usr_id = :usr_id AND pic_id = :pic_id"; $stmt = $db->prepare($sql); $stmt->bindValue(":usr_id", $_SESSION['user']['usr_id']); $stmt->bindValue(":pic_id", $pic_id); $st...
true
e18e943b6fe4e6f1d8f2425d6bba8d2999bf3509
PHP
yafeile/Simple_Study
/Simple_PHP/MP/md/Model/Category.class.php
UTF-8
3,764
3.203125
3
[]
no_license
<?php /* 栏目类 */ class Category extends DB{ public $table = 'category'; /* * 添加栏目方法 * @param1 string $c_name 栏目名 * @param2 string $c_keywords 栏目关键字 * @param3 string $c_content 栏目内容 * @param4 int $c_state 栏目状态 默认1 表示显示 * @return boolean 成功返回true 失败返回false */ public function ...
true