PHP
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*PHP [#vd99413a]
#contents
php -r "phpinfo();"
$xml = simplexml_load_file('hoge.xml');
var_dump($xml);
$hogefuga = $xml->{'hoge-fuga'};
<?php
$array = array( "array1", "array2", "array3", "array4" );
?>
<?php
$DB_HOST = "localhost";
$DB_USER = "nuzou";
$DB_PASSWORD = "nuzoudb";
$DB_NAME = "nuzou_pw";
function db_connect()
{
global $DB_HOST, $DB_USER, $DB_PASSWORD, $DB_NAME;
$link = mysqli_connect($DB_HOST, $DB_USER, $DB_PASSWORD...
return $link;
}
function db_close($link)
{
mysqli_close($link);
}
?>
function utf8_to_sjis($utf8_string) {
return mb_convert_encoding($utf8_string,"SJIS","UTF-8");
}
function sjis_to_utf8($sjis_string) {
return mb_convert_encoding($sjis_string,"UTF-8","SJIS");
}
echo date("Y/m/t");
echo date("Y/m/d", mktime(0,0,0,date("m"),0,date("Y")) );
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; char...
</head>
<body>
<form action="upload.php" method="post" enctype="multi...
<input type="file" name="upload"/><br />
</form>
</body>
</html>
<?php
if( $_FILES )
{
$filename = mb_convert_encoding( $_FILES['upload']['na...
$uploadfile = "/var/tmp/test/" . $filename;
move_uploaded_file( $_FILES['upload']['tmp_name'], $up...
}
?>
$proxy = array(
'http' => array(
'request_fulluri' => true,
),
);
$proxy_context = stream_context_create($proxy);
var_dump($raw);
**Smarty [#ta1efdc7]
-[[Smarty]]
$pdo = new PDO("odbc:DRIVER={SQL Server};UID=<USER_ID>;P...
, "<USER_ID>", "<PASSWORD>");
$filename = 'hogehoge.jpg';
if (file_exists($filename)) {
} else {
}
$filedata = file_get_contents('hogehoge.txt');
fwrite($fp,"hogehoge");
fclose($fp);
$filedata = file_get_contents('hogehoge.txt');
foreach($file_line as $line) {
list($data1,$data2,$data3) = split("\t", $line); // TAB...
echo "1:" . $data1 . " / 2:" . $data2 . " / 3:" . $data...
}
**foreach [#lb97c5df]
foreach ($array as $value) {
echo $value;
}
**function [#i3f62a94]
function ($hoge, $fuga) {
return $hoge . $fuga;
}
function ($hoge, $fuga, &$hogefuga) {
$hogefuga = $hoge . $fuga;
}
MIBS=ALL
MIBSDIR=C:\PHP5\extras\mibs
$data = array(
array("id" => "1", "data" => "0"),
array("id" => "2", "data" => "200"),
array("id" => "2", "data" => "0"),
array("id" => "2", "data" => "200")
);
$tmp = array();
foreach($data as $key => $val){
if(!in_array($val,$tmp)){
$tmp[] = $val;
}
}
$data = $tmp;
yum erase php
yum erase php-common
yum install php53
yum install php53-*
-PEAR
yum install php-pear
pear upgrade --force Archive_Tar
pear upgrade --force Console_Getopt
pear upgrade PEAR
**IIS8+PHP5 [#jead54e4]
終了行:
*PHP [#vd99413a]
#contents
php -r "phpinfo();"
$xml = simplexml_load_file('hoge.xml');
var_dump($xml);
$hogefuga = $xml->{'hoge-fuga'};
<?php
$array = array( "array1", "array2", "array3", "array4" );
?>
<?php
$DB_HOST = "localhost";
$DB_USER = "nuzou";
$DB_PASSWORD = "nuzoudb";
$DB_NAME = "nuzou_pw";
function db_connect()
{
global $DB_HOST, $DB_USER, $DB_PASSWORD, $DB_NAME;
$link = mysqli_connect($DB_HOST, $DB_USER, $DB_PASSWORD...
return $link;
}
function db_close($link)
{
mysqli_close($link);
}
?>
function utf8_to_sjis($utf8_string) {
return mb_convert_encoding($utf8_string,"SJIS","UTF-8");
}
function sjis_to_utf8($sjis_string) {
return mb_convert_encoding($sjis_string,"UTF-8","SJIS");
}
echo date("Y/m/t");
echo date("Y/m/d", mktime(0,0,0,date("m"),0,date("Y")) );
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; char...
</head>
<body>
<form action="upload.php" method="post" enctype="multi...
<input type="file" name="upload"/><br />
</form>
</body>
</html>
<?php
if( $_FILES )
{
$filename = mb_convert_encoding( $_FILES['upload']['na...
$uploadfile = "/var/tmp/test/" . $filename;
move_uploaded_file( $_FILES['upload']['tmp_name'], $up...
}
?>
$proxy = array(
'http' => array(
'request_fulluri' => true,
),
);
$proxy_context = stream_context_create($proxy);
var_dump($raw);
**Smarty [#ta1efdc7]
-[[Smarty]]
$pdo = new PDO("odbc:DRIVER={SQL Server};UID=<USER_ID>;P...
, "<USER_ID>", "<PASSWORD>");
$filename = 'hogehoge.jpg';
if (file_exists($filename)) {
} else {
}
$filedata = file_get_contents('hogehoge.txt');
fwrite($fp,"hogehoge");
fclose($fp);
$filedata = file_get_contents('hogehoge.txt');
foreach($file_line as $line) {
list($data1,$data2,$data3) = split("\t", $line); // TAB...
echo "1:" . $data1 . " / 2:" . $data2 . " / 3:" . $data...
}
**foreach [#lb97c5df]
foreach ($array as $value) {
echo $value;
}
**function [#i3f62a94]
function ($hoge, $fuga) {
return $hoge . $fuga;
}
function ($hoge, $fuga, &$hogefuga) {
$hogefuga = $hoge . $fuga;
}
MIBS=ALL
MIBSDIR=C:\PHP5\extras\mibs
$data = array(
array("id" => "1", "data" => "0"),
array("id" => "2", "data" => "200"),
array("id" => "2", "data" => "0"),
array("id" => "2", "data" => "200")
);
$tmp = array();
foreach($data as $key => $val){
if(!in_array($val,$tmp)){
$tmp[] = $val;
}
}
$data = $tmp;
yum erase php
yum erase php-common
yum install php53
yum install php53-*
-PEAR
yum install php-pear
pear upgrade --force Archive_Tar
pear upgrade --force Console_Getopt
pear upgrade PEAR
**IIS8+PHP5 [#jead54e4]
ページ名: