Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
oXteR каза:С html няма да намериш :?:
oXteR каза:я дай да видим кой скрипт не ти става от туриста при мен всички работят :?:
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Upload System</strong></td>
</tr>
<tr>
<td>Избери файл
<input name="ufile" type="file" id="ufile" size="50" /></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Качи" /></td>
Ето този е много добър, но у нас неще да работи иска ми да смена ченч мод, но не става на windows-а кво ли не го мъчих и тва си е :
[code]</head>
<?php
@session_start();
$site_name = $_SERVER['HTTP_HOST'];
$url_dir = "http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$url_this = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
$upload_dir = "files/";
$upload_url = $url_dir."/files/";
$message ="";
/************************************************************
* Create Upload Directory
************************************************************/
if (!is_dir("files")) {
if (!mkdir($upload_dir))
die ("upload_files directory doesn't exist and creation failed");
if (!chmod($upload_dir,0755))
die ("change permission to 755 failed.");
}
/************************************************************
* Process User's Request
************************************************************/
if ($_REQUEST[del]) {
print "<script>window.location.href='$url_this?message=deleted successfully'</script>";
}
else if ($_FILES['userfile']) {
$message = do_upload($upload_dir, $upload_url);
print "<script>window.location.href='$url_this?message=$message'</script>";
}
else if (!$_FILES['userfile']);
else
$message = "Invalid File Specified.";
/************************************************************
* List Files
************************************************************/
$handle=opendir($upload_dir);
$filelist = "";
while ($file = readdir($handle)) {
if(!is_dir($file) && !is_link($file)) {
$filelist .= "<br><a href='$upload_dir$file'>".$file."</a>";
}
}
function do_upload($upload_dir, $upload_url) {
$temp_name = $_FILES['userfile']['tmp_name'];
$file_name = $_FILES['userfile']['name'];
$file_type = $_FILES['userfile']['type'];
$file_size = $_FILES['userfile']['size'];
$result = $_FILES['userfile']['error'];
$file_url = $upload_url.$file_name;
$file_path = $upload_dir.$file_name;
//File Name Check
if ( $file_name =="") {
$message = "Invalid File Name Specified";
return $message;
}
//File Size Check
else if ( $file_size > 85000000) {
print $file_size;
$message = "The file is large !.";
return $message;
}
//File Type Check
else if ( $file_type == "text/plain"
|| $file_type == "application/force-download"
|| $file_type == "application/octet-stream") {
$message = "Sorry, You cannot upload any script file" ;
return $message;
}
$result = move_uploaded_file($temp_name, $file_path);
if (!chmod($file_path,0755))
$message = "change permission to 755 failed.";
else
$message = ($result)?"$file_name($file_type) uploaded successfully." :
"Somthing is wrong with uploading a file.";
return $message;
}
?>
<p><br>
</p>
<p> </p>
<table style="width: 59%" align="center" valign="top"><tr>
<td align="center" class="style1">
Browse your Video Clips</td></tr>
<tr>
<td class="style2"><span class="style4">The File is max. size : 70 000 kb.</span><br>
<div align="center" style="width: 462px;" class="style3">
After review from Administrator, your video will be publishing</table>
<body style="background-color: #075579"><center>
<font color=red><?=$_REQUEST[message]?></font>
<br>
<form name="upload" id="upload" ENCTYPE="multipart/form-data" method="post">
<span class="style4">Up to your video clip:</span> <input type="file" id="userfile" name="userfile">
<input type="submit" name="upload" value="Upload">
</form>
<br>
<br>
</center>
<?
if ($_REQUEST[debug]==1) print "------------------Debugging Info----------------<br>";
if ($_REQUEST[debug]==1) print "site=$site_name<br>dir=$url_dir<br>url=$url_this<br>";
if ($_REQUEST[debug]==1) print "upload dir=$upload_dir<br>upload url=$upload_url<br>";
?>
<?php
//файловете ще се съхраняват в папката upload
//$HTTP_POST_FILES['ufile']['name']; = качва името на файла
//за пример качваме файл на име cartoon.gif . $path то ще бъде качено - /cartoon.gif
$path= "upload/".$HTTP_POST_FILES['ufile']['name'];
if($ufile !=none)
{
if(copy($HTTP_POST_FILES['ufile']['tmp_name'], $path))
{
echo "<b><font color=green>Качването на файла мина успешно</b></font><BR/>";
//$HTTP_POST_FILES['ufile']['name'] = име на файла
//$HTTP_POST_FILES['ufile']['size'] = големина на файла
//$HTTP_POST_FILES['ufile']['type'] = мястото на файла
echo "Име на файла :".$HTTP_POST_FILES['ufile']['name']."<BR/>";
echo "Големина на файла :".$HTTP_POST_FILES['ufile']['size']."<BR/>";
echo "Място на файла :".$HTTP_POST_FILES['ufile']['type']."<BR/>";
echo "<img src="$path" width="150" height="150">";
}
else
{
echo "<b><font color=red>Грешка</b></font>";
}
}
?>
<form method="POST" enctype="multipart/form-data" action="--WEBBOT-SELF--">
<p><input type="file" name="F1" size="20"><input type="submit" value="Enviar" name="B1"><input type="reset" value="Restablecer" name="B2"></p>
</form>
scourge каза:А все пак качил ли си PHP към това apache ? :shock:
jooorooo каза:каква грешка ти дава?
<form action="second.php" method="POST" enctype="multipart/form-data">
Изберете картинка:<br />
<font size="-1">(препоръчителна височина на картинката: 40px)</font><br /><br />
<input type="file" name="imgfile" /><br /><br />
<input type="submit" name='submit' value="Качи Картинката" />
</form>
<?php
if(isset($_POST['submit'])) {
$uploadpath = "../img/";
$uploadpath = $uploadpath . basename( $_FILES['imgfile']['name']);
if(move_uploaded_file($_FILES['imgfile']['tmp_name'], $uploadpath)) {
echo"Файлът ". $_FILES['imgfile']['name'] ." беше качен успешно";
}
else {
echo "There was an error uploading the file, please try again!";
}
}
?>