vegasbp
11-06-2006, 04:06 AM
OK so I am using this code to sorta make a small image host for me and my friends but its acting up........to start, here is my code
<?php
if($_FILES['fild']['name']){
$file_path = $_FILES['fild']['tmp_name'];
$file_name = $_FILES['fild']['name'];
$file_size = $_FILES['fild']['size'];
$file_type = $_FILES['fild']['type'];
$file_error = $_FILES['fild']['error'];
if(is_uploaded_file($file_path)){
copy($file_path, $file_name) or die('There was an error while uploading your file. Please try again.');
echo('Your file has been uploaded.<br>Thank you!');
echo ("<br>The URL is: rxrowley.6te.net/1/".$_FILES['fild']['name']);
}
}else{
?>
<form method="post" enctype="multipart/form-data">
<input TYPE="file" name="fild">
<input name="submit" type="submit" value="Upload" />
</form>
<?php
}
?>
So, The image will upload just fine, but when I try to put in the URL, it does not work, the only way I can get the image to display is by making a link from a page.....hmmmm.......any takers?
<?php
if($_FILES['fild']['name']){
$file_path = $_FILES['fild']['tmp_name'];
$file_name = $_FILES['fild']['name'];
$file_size = $_FILES['fild']['size'];
$file_type = $_FILES['fild']['type'];
$file_error = $_FILES['fild']['error'];
if(is_uploaded_file($file_path)){
copy($file_path, $file_name) or die('There was an error while uploading your file. Please try again.');
echo('Your file has been uploaded.<br>Thank you!');
echo ("<br>The URL is: rxrowley.6te.net/1/".$_FILES['fild']['name']);
}
}else{
?>
<form method="post" enctype="multipart/form-data">
<input TYPE="file" name="fild">
<input name="submit" type="submit" value="Upload" />
</form>
<?php
}
?>
So, The image will upload just fine, but when I try to put in the URL, it does not work, the only way I can get the image to display is by making a link from a page.....hmmmm.......any takers?