Images In Folders
I'm a newbie and I need a good starting off point. Basically is there
a way in php where you can call up all images (jpgs and gifs) within a
directory. Also is there a way to format the images to come up in rows. Hope
this makes sense.
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Uploading Images In Folders
Does Anybody know a good script to upload images to a directory with different folders inside.. I want users to be able to upload it to the folder that they choose or create a new folder within the dir IMAGES. The script can only accept JPG, JPEG and GIF extensions.
View Replies !
View Related
Dynamically Build Table Of Images From Folders?
I have on our company web site a folder named "gallery". In that folder are MANY folders with varying names ("Bethel","Hamptonburgh",etc..). In each of these folders are a number of images and slideshow.php. What I am looking to do is dynamically build a Master page that will look in the Gallery folder, add a table cell for each sub folder, select 1 image from that folder (doesn't matter which one) to display in the cell, and give the cell a link to the corresponding slideshow.php for that group of images. The dynamic table needs to be 2 columns by "x" rows. Now, I can build a table using php, but how the heck do I go about getting all the folder links and images? Any ideas? The sub folders change constantly, with new stuff added and old stuff removed. If this can be done it would save me a TON of edit work on just this one page alone..
View Replies !
View Related
Folders
I have a simple variable: $fulldir = 'photo_upload';but when I moved the script that this variable is in, the adress should be $fulldir = '../photo_upload'; But this is giving me a error, what would be the correct way of specifing the directory ?
View Replies !
View Related
Uploading Folders
Is it possible to upload entire directories from a form in such a way that a user can browse to the folder on their local machine and select it for uploading or synchronization? I am using php5.
View Replies !
View Related
Reading Folders
If I had several folders full of images, how can I get PHP to open the folder, read the image names and save the image names (inc extension) to a MySQL database? What I am trying to do is create an image gallery using PHP/MySQL, so that everytime i take a load of pics, all I would have to do is get PHP to read the contents of the folder and add the filenames to a MySQL database rather than having to manually input the names into the database
View Replies !
View Related
Gziping Folders
I'm using PHP and Gzip off the server to gzip up some files. If I select individual files, everything is fine, but I can't figure out the syntax to gzip a folder. $zipfile=shell_exec("gzip -9 test.html"); That's what I'm using for a file. But how do a zip a folder?
View Replies !
View Related
Protecting Folders
I have a data driven website. Part of the website is a downloads section - all the downloads are help in a folder called "downloads". When a general user (i.e. one that doesn't have a log in) uses the site and access the downloads page they are given a list of general downloads. When a member who has logged in uses the site, the same page presents the general downloads and the member only downloads. This all works fine. A slight hole in this security, however, is that the downloads folder is not protected. I have moved the member downloads into a subfolder within downloads. How can I protect this so that only people who are logged in can access it - so that general users cannot accidentally browse it or make a direct link to the documents within it?
View Replies !
View Related
Sorting Folders
I have a site with photo-albums on it. Each directory represents an album. What i want is on the "home page" of the site a feature which says "newest album: *******" So i have to search the album directory, and then sort them by date. And then it automatically has to grab the newest album. Maybe a slight problem is that the albums are divided over 4 subcategories. (Match, players etc.) Match: - Match 1 - Match 2 - Match 3 Players: - player 1 etc... Albums would be 'Match 1', 'Match 2', etc. hope ypu understand.
View Replies !
View Related
Files And Folders
I need to display images on the site. Every image is being stored in its own folder. Folders are updated daily. I need to display a list folders (like FTP), and when a user clicks on a folder name, it will show them other folders inside the parent folder, or if there are no more folders inside picture files will be opened. I know how to get a list of files and open them when I am in a current folder. PHP Code:
View Replies !
View Related
Creating Folders
im in member.php which is inside a folder called 'member' i have a folder called 'collection' which is outside this member directory. i want to create a folder inside the 'collection' folder based on the username, e.g, $_SESSION['Username'] . "_images"; so that will be like: john_images folder. i want to actually check if the folder 'john_images' doesn't already exist though. can soemone please show me how it can be done?
View Replies !
View Related
Cookies With Different Folders
I have 2 pages that save cookies, and one is in a folder called "myevent" (mydomain.com/myevent/) and the other is at the root of the website (mydomain.com/) Is there any way to get the same cookie to load in both the folders? here is the code I use to save them: setcookie("contNumber",$_POST['txtContNum'],time()+60*60*24*30,"","mydomain.com",0); setcookie("emailAddy",$_POST['txtEmail'],time()+60*60*24*30,"","mydomain.com",0);
View Replies !
View Related
Counting Folders
I am looking to call a function that will simply report a 3 numbers back as variables. 1st variable returned: number of folders created in a given location either today or yesterday. 2nd variable returned: number of folders modified in a given location either today or yesterday. 3rd variable returned: total number of folders in a given location again I do not have the function wrote, but just an example what I would like to accomplish example of what I would like to call would be: Code:
View Replies !
View Related
Passwording Folders
you may have seem my last post "Passing a file to a funcion without user input" well I thought I'd got it working. It does everything I want it to apart from work :-(. It makes the file and copies it into the right place, but the passwords don't let me in. Code:
View Replies !
View Related
Accessing Folders
I want to be able to read and then display files in php (files based within a folder within our web root folder), is there a way in which php can do this directly? They are going to be saved html pages and I want to be able to list them so users can view them.
View Replies !
View Related
Cookies In Folders
I've set a cookie, which is working fine, but it's only accessable from the folder of the page I set it in (in this case the admin folder). I didn't specifically tell it to set in that folder, but it only works on files in there. I need to be able to access it from all folders in the site. What am I doing wrong?
View Replies !
View Related
PHP Security In Folders
I have programmed several PHP scripts which write and remove files over "EMPTY" folders and only accessed by these PHP scripts. I would like to know what is more secure: To enable permissions of these folders with chown nobody/nobody (how is running my PHP) and chmod 644 or To enable permissions of these folders with chmod 777 and chown user_name/group_name (namely the default UID and GID of my site).
View Replies !
View Related
Folders To Subfolders
This code takes a direcrory and adds it to a .tar. I want it to go through and add subfolders underneath the directory as well. Ill post up tar.php if you need me to. <?php include('tar.php'); $new_tar = new tar(); $directory = 'the_directory' $new_tar->addDirectory($directory); $d = opendir($directory); while (false !== ($entry = readdir($d))) { if($entry != '.' && $entry != '..' && !is_dir($entry)) $new_tar->addFile($directory.'/'.$entry); } closedir($d); $new_tar->toTar('myTarFile.tar', false); ?>
View Replies !
View Related
Virtual Folders
I can't get file command like file($fileName) and file_exists($fileName) to work with a file stored on another server and accessible through a virtual folder. /resources/ is a virtual folder pointing to a location on a remote server that is accessible via network, file_exists("/resources/tmp/test.txt")src = "/resources/tmp/test.txt" however does work oddly enough.
View Replies !
View Related
Stamps/inserts Small Images (logos) Onto Larger Images.
It may be called image stamping or water marking but im not sure. Basically i want a script that prints/stamps a smaller image onto a larger one, the smaller mage being a logo. This will make it harder for people to steal my pictures as they will have my logo on them. An example of this is with ebay, when you submit a picture of the item your selling ebay will printe a small logo in the bottom right corner of the picture. Could anyone suggest a script for this, just a simple one then i can mess around with it and make it better.
View Replies !
View Related
Displaying The Parent Folders Name
Say there is an url like this for example: www.mydomain.com/pics/b/basketball/index.php using php, is there a way to just display the word basketball in the index.php file? I would also need to display it in the title tags like this: <title>Basketball pics</title>
View Replies !
View Related
Protect File Folders
How do I protect file folders like "stylesheets" "php scripts" etc, from exposing their directories to the public? If a visitors would come upon these folders, they would be able to see the content of the folder, and view the documents.
View Replies !
View Related
Automattic Folders Question
Would it be possible to do the following? and if so , any body have any ideas where i should start. I want to allow users of a web site to create a page (index.php) inside of a folder that is the name of their company so : X Y Z Company would be: http://www.domain.com/X Y Z Company/ or should it be:? http://www.domain.com/X-Y-X-Company/ and i would want index.php to be inside of those directories so that a user could log in and change the information on index.php through a certain amount of form fields. The hardes part i think will be creating the directories on the fly if a user signs up for a site. the index.php page will be simple b/c it will just query the database and then pull the info from the URL.
View Replies !
View Related
PHP Access To .htaccess Folders
I've a folder which holds image (.gif/.jpg) files. the folder has been .htaccessed to prevent direct URL access. However, this also prevents my php codes to make calls to this folder. the following proposed solution does not work: 1. putting the image folder outside my root directory - i don't have access to the root directory 2. having <directory> codes </directory> in .htaccess does not work - it blocks everything.
View Replies !
View Related
Dealing With Folders/paths
When I develop a site I normally develop it within a directory from the domain name. Example if I was developing a site at http://www.dogs.com I usually would have my development work in a folder located at http://www.dogs.com/jeff/ When I code re-direction links for headers I then do this: Code: $link = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/enquiries.php"; But then when it comes to moving the site to the root of the domain, the re-direction link creats an extra slash(/) to the link being created because there is no sub folder. How do I tacke this situation automatically instead of manually changing all the link variables without removing the dirname($_SERVER['PHP_SELF']).
View Replies !
View Related
Copy Files And Folders
Assuming you had a template folder and files on the webspace and you wanted to make a exact copy/rename of it with a username and password being the one and only difference - how would one do it ? . (the difference being a password protected folder)
View Replies !
View Related
Using Files/folders To Create A DB
I'm always looking for ways to decrease the amount of time I spend adding records to my database. I was thinking about this today, and wondered if it was possible.... I want a PHP script to open a folder or folders, read the files, and make a record in the database for each file. For example: Folder 1 contains the files--4000out.jpg, 3000bcr.jpg, 4000btcf.jpg, etc... When excuted, the script would create (in this case) three records. I only want the script to do the base work, I will add what can't be done to the records later. Also, in the case with mp3's. I'd like the script (or a seperate one) to insert each record using the ID3v1 tag info. I'm familiar with open files and folders...but haven't come across any tutorials or scripts that do this. So...is this possible?
View Replies !
View Related
Securing Folders With Php Linux
I am creating a site in php on a dedicated linux redhat server. Users will sign up to the site and get the own url/folder www.mycompany.com/username They will be able to store files in their folder/url Can anyone give me any idea how to secure the folder so that only once logged in people can access the files in the folder. I want to stop anyone from being able to go to www.mycompany.com/username/file1.doc and being able to download it. I am using MYSQL 5 and PHP 5 and the latest version of Redhat Linux.
View Replies !
View Related
Cannot Delete Folders After Mkdir()
I am using php to make a directory (to store all of the users files for the site), and it works fine mkdir("/home/fullpathtomyserver/public_html/users/$users_id/", 0777); It makes the folder just perfect, BUT there is a flaw. The folders it creates are un-deletable. I can browse them, and even link to files within them, but I cannot delete them at all. I have tried deleting them through FTP and cPanel's File Manager,
View Replies !
View Related
Copying Old Folders To A New Location
I'm trying to write a page that would make a copy of a set of folders to a new location for an intranet. There is lots in the page for debugging that would vanish once I get it to work. The problem I'm getting is I cannot get XCOPY to work. Other dos commands work fine. Code:
View Replies !
View Related
Session Not Working In Folders
We just moved a script to a clients server. We developed in PHP 4 and everything worked fine. The clients server is PHP 5. Sessions work perfect when its in the main public_html directory. When a user goes to a folder ie oursite.com/folder/ the session is no longer there. Is there any changes in the versions that would cause a session to no longer be valid when you enter a folder?
View Replies !
View Related
Hide File And Folders?
I just installed php apache and mysql on windows xp platform. i had a small problem, when i type localhost in the browser it dispalys all the folders and files, i would like to hide all this folders from praying eyes and direct the user to index.php. Is there anyway i could restrict the display of files and folders when user type localhost and redirect themto index.php.
View Replies !
View Related
How Many Folders Can Apache Hold
how many folders can apache hold in one directory ? Im useing linux. It didnt occur to me untill now, im writeing a script that uploads files and gives a user a link to download it, and each file is stored in its own folder with a unique ID. But now its occured to me that this may become a problem in the future.
View Replies !
View Related
Counting Folders And Files Within Them?
i'm working on a project and I'm having trouble figuring out my next move. I have image galleries setup in a folder directory like so: top directory | -Gallery 1 -Gallery 2 -Gallery 3 and so on. I've got about 25 galleries total. What I'm trying to do, is count the number of folders (Galleries). That is my first main problem. Second, I'd liek to count the total number of files within all of those combined folders. I know how to count files within each separate folder, and i suppose i could just use the sum of those, but is there a separate, easier way to do that?
View Replies !
View Related
Searching Folders For Files.
One section of my site has the most recent files that have been added to the site. Right now, I add them manually. This takes too long and sometimes I will misspell something and mess it up. What I am wanting is a PHP script that can search all the folders (which I can specify) for files that are uploaded, while excluding the index.php pages. This script should extract the title (I echo the title from <? $title = 'TITLE HERE' ?>) from the file and place a hyperlink that says that extracted title. And place that link on the "Most recent files" section of my site. While doing this, the list should only stay at the most recent 10.
View Replies !
View Related
Issue Calling Folders
I'm desinging a site right now in a location that it may be be later on in life. I want to keep it so that the folder strucutre is constant and defined so i have a file called constants which looks like Code:
View Replies !
View Related
Searching Folders For Files
One section of my site has the most recent files that have been added to the site. Right now, I add them manually. This takes too long and sometimes I will misspell something and mess it up. What I am wanting is a PHP script that can search all the folders (which I can specify) for files that are uploaded, while excluding the index.php pages. This script should extract the title (I echo the title from <? $title = 'TITLE HERE' ?>) from the file and place a hyperlink that says that extracted title. And place that link on the "Most recent files" section of my site. While doing this, the list should only stay at the most recent 10. I know of a couple of other sites who do this, I do not know if this is the method or if it is database driven, but I hope what I ask is plausable and someone can help me out with it.
View Replies !
View Related
Mysql Slower In Folders
The availability is displayed in 3 blocks, that mean <table>code php mysql</table> <table>code php mysql</table> <table>code php mysql</table> The page is slow in the first level mydomain/page1.php but the same code in second level is 3 times slower mydomain/folder/page2.php I thought something was wrong with the page, but no, the same page (page2.php) if I save it in first level in the domain it is not that slow? Is it so that mysql is slower in folders than in first level? To fix that I was trying to use flush() but I can“t get it to work.
View Replies !
View Related
Create Files And Folders
Is there any way I can get my script to be able to create and CHMOD folders and files? I always get the following error: mkdir(TESTDIR): Permission denied in /usr/www/users. Is there a way I can enable the script to do all that by placing a htaccess file which contains some permissive directives?
View Replies !
View Related
Copying Entire Folders
I am trying to copy a folder (which has subfolders and those subfolders possibly have folders) to a destination. I tried using PHP's 'copy' function, but it didn't work. I know I have my $src and $dst variables pointing to the exact places I need, but it just isn't working. I am not getting any errors, it just doesn't do the copy. Is the PHP copy function only for files or can it work for folders as well? I heard about the XCopy command also. Can you anyone give an example of using that?
View Replies !
View Related
|