Okay, here's what I'm trying to do. Any files that contain apostrohpes dont seem to get put into the table at all, and thus don't get shown in my final file listings...
here is the table layout and what im trying to do...
create table file_info (
id int not null auto_increment,
sysid int,
filename varchar(255),
title varchar(255),
filesize int,
views int,
downloads int,
lastdl varchar(255),
primary key(id)
);
<?php
$handle = opendir($path."/".$folder);
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file! = "WS_FTP.LOG") {
$file = stripslashes($file);
$title = str_replace ("_"," ","$file");
$title = str_replace (".zip","","$title");
$filesize = filesize("$path/$folder/$file");
$sql = "INSERT INTO file_info (id, sysid, filename, title, filesize, views, downloads, lastdl) VALUES ('','$folder','$file','$title','$filesize','0','0','Never Downloaded')";
mysql_query($sql);
}
}
?>
I've tried things like documentation and such already (maybe I just dunno where to look), and no one I've asked has ever had this problem...
here is the table layout and what im trying to do...
create table file_info (
id int not null auto_increment,
sysid int,
filename varchar(255),
title varchar(255),
filesize int,
views int,
downloads int,
lastdl varchar(255),
primary key(id)
);
<?php
$handle = opendir($path."/".$folder);
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file! = "WS_FTP.LOG") {
$file = stripslashes($file);
$title = str_replace ("_"," ","$file");
$title = str_replace (".zip","","$title");
$filesize = filesize("$path/$folder/$file");
$sql = "INSERT INTO file_info (id, sysid, filename, title, filesize, views, downloads, lastdl) VALUES ('','$folder','$file','$title','$filesize','0','0','Never Downloaded')";
mysql_query($sql);
}
}
?>
I've tried things like documentation and such already (maybe I just dunno where to look), and no one I've asked has ever had this problem...