dennismonsewicz
Members-
Posts
1,136 -
Joined
-
Last visited
Everything posted by dennismonsewicz
-
check this out: http://forums.digitalpoint.com/showthread.php?t=9338
-
fread() and directory crawling
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
Gotcha. I found a tutorial online and I am going to use what you suggested. I also need to dump the filenames into a Database. I am basically creating a stock photo site but instead of having to upload each individual file i am trying to just dump all of the photos in respected DIRs and have a PHP file do the dirty work -
fread() and directory crawling
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
$dir = dir(".") -> is this where I put the path to my directory? and what kind of file handling code would i use? -
fread() and directory crawling
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
bump -
fread() and directory crawling
dennismonsewicz replied to dennismonsewicz's topic in PHP Coding Help
if not using fread or any f functions then could this be achieved by doing anything else? BUMP -
Is there anyway to have fread(), fopen(), or any other f functions to crawl a directory and grab the files and strip the name of the files and size of the files?
-
NEVERMIND I AM AN IDIOT! TOPIC SOLVED!
-
that didn't work, all of the results in one of the columns disappeared
-
Well the problem with that is that it won't work in the SQL statement.
-
I have a full text search engine on my site. I would like to color code their search. For Example: If a user searches for "Cat", I would like to to be able to highlight the word cat with a color throughout the results. Any ideas?
-
what does the @ symbol do? I am hearing that is isn't necessary then sometimes I hear it is! Explanation?
-
Thanks, I will have to try this tomorrow. I am leaving work now. Thanks for all the help!
-
try echoing out the email and password and start debugging
-
ah gotcha... that makes much more sense then anyone who has ever explained it to me. Thanks!
-
so I could place the files in a folder outside of the public folder and still be able to force download them? what would the header() look like? and I can't used .htaccess cause I am using IIS
-
can you explain the difference in using single quotes versus doubles? I know thats a n00b question, but like I said I get confused with em sometimes and just would like some clarity, thanks!
-
Not really I already have a script running for the download once you are logged in. What I am wanting is for when someone uploads a file, they can't just in the direct link to the file and download or see the file.
-
you could try that or this: $sql="SELECT email, password FROM sign WHERE email = ".$email." AND password = ".$password." "; I always get the single quote, double quote thing mixed up
-
$sql="SELECT email, password FROM sign WHERE email = '".$email."' AND password = '".$password."' "; change the above to this $sql="SELECT email, password FROM sign WHERE email = '.$email.' AND password = '.$password.' ";
-
LOL MS ACCESS for a DB is a pain in the arse! I used it for a Cold Fusion project! I know I know laugh it up, cold fusion SUCKS!
-
I need a script that will "crawl" a directory and check to see if files exist and to print a 404 error page if someone tries to directly link to a file in the directory. any ideas?
-
why are you using MS ACCESS for your login script?
-
Ok here is my code: <?php $username = $_GET['username']; $id = $_GET['id']; if(isset($username)) { require "../includes/sql.php"; $query = "UPDATE uploads SET downloaded_by = '$username' WHERE id = '$id'"; mysql_query($query) or die("ERROR: " . mysql_error()); } if(isset($username)) { // if id is set then get the file with the id from database include "../includes/sql.php"; $query = "SELECT name, type, size " . "FROM uploads WHERE id = '$id'"; $result = mysql_query($query) or die('Error, query failed'); list($name, $type, $size) = mysql_fetch_array($result); header("Content-length: $size"); header("Content-type: $type"); header("Content-Disposition: attachment; filename=$name"); readfile($name); exit; } ?> can you send the id to the header verifying the id and username?
-
Well adding an image into a DB via binary data becomes a problem when you need to backup a DB or when you get tons of records because it becomes bogged down. Now I have been told this recently, so I have not experienced these problems, so I could sound like a complete moron
-
Hmmmm, well storing the image in a DB is a no no, cause you don't want to insert binary data into the db. So how would i achieve inserting the key or code in to a db? And I, sadly this is true, do not have .htaccess running cause we have an IIS server I KNOW I KNOW it is very sad