Displaying All Pics In A Folder
I would like to write a script that displays all photos (jpg) from a folder. I want to be able to load photos into a folder without renaming them and have a script sort them and display them alphabetically.
View Complete Forum Thread with Replies
Related Forum Messages:
Displaying Folder Contents
I am trying to display the contents of a folder for users to view/download, what is best way to do this? Also, is there a way to "hide" specific files in that folder that I do not want displayed?
View Replies !
Displaying Image From Folder
I want to list all the image file in an array from a directory and then display them such that they appear say, 6 images per page. Can some1 please give me the code to do this.
View Replies !
Displaying Files In A Folder Using A Calender
I have excel sheets generated daily and weekly in this format for filenames..for daily sheets the filename is Jan-10-2002 (mmm-dd-yyyy) and weekly Week-39-2002. I have a script that uploads to a constant folder all the excel sheets. Is there a script that can display the daily scripts in form of a calender. I.E a user can choose to view or download the sheet by choosing the date? Also another for displaying weekly excel sheets in a weekly format.
View Replies !
Problem With Displaying Folders From Folder
I want to display all the folders present from 1 folder, it works fine and gives me . and .. as directory listing which is not good. The code is as follows: $path = "../cuz"; $img = opendir($path); while($file = readdir($img)) { if(is_dir($file)) { echo "Folder name is ". $file; } } closedir($img);
View Replies !
Creating Pics On The Web
I am developing a claims input form. part of this form, the original paper version, was to draw a brief picture of the accident. Is there anyway in PHP, or other addied controld to achieve the same result.
View Replies !
2 Pics In Layers
I have a site where I have pictures and frames for the pictures. Is it possible that user picks a picture (it opens in same or a new window) and then picks a frame (which is added to the border of the picture selected) to see how it looks. There will be different pictures and frames. Any idea of how this can be achieved, if not in php, some other way?
View Replies !
Retrieve All Pics From Url
I want to get all pics (.jpg) from a url and I use this code but sometimes with some urls it doesnt work :( Anyone can check it out? $text = implode("", file($url)); $text = eregi_replace("<!--([^-]|-[^-]|--[^>])*-->","", $text); while (eregi("[:space:]*(img)[:space:]*=[:space:]*([^ >]+)", $text, $regs)) { $regs[2] = ereg_replace(""", "", $regs[2]); $regs[2] = ereg_replace("'", "", $regs[2]); $regs[2] = preg_replace("/(s.+)/" , "" , $regs[2]); if(eregi(".jpg|.jpeg|.jpe",$regs[2])){ echo $regs[2]."<br>"; } $text = substr($text, strpos($text, $regs[1]) + strlen($regs[1])); }
View Replies !
Insert 6 Pics
I am still struggling with this CMS but getting there anyway. the CMS needs to have an admin section for inserting new records. This needs to include upto 6 images which i will be storing in the DB as path names using unique IDs. My problem is P.S picture 1 needs to be thumbnailed aswell. All must have restricted size and be jpgs. Is it better to insert 1 at a time? if so how? Is it better to insert all 6 via 6 browse fields in the form? if so will this potentially burn temp memory set at 8mb?
View Replies !
Php Include Pics
I know how to use the php include funtion, but it only seems to work in the same folder, or from a folder to sub-folder. I was wondering if there is a way to do these things, as it would make my website a lot easier to maintain. Is there a way I can include pictures, or folders that include pictures? I include a folder of items? Can I include " html_root/home/folder/header.php" in "html_root/mypage/folder/index.php".
View Replies !
Resizing Pics On The Fly With NetPbm
I need thumbnails to be dynamically and instantly created on the fly. My server supports GD and NetPbm. I tried a program that uses GD but the pictures looked aweful! Is there a way, using PHP and NetPbm that I can call an image like this: <img src="thumb.php?image=pic.jpg&height=20> So that a 20 pixal high jpg thumbnail of pic.jpg is returned?
View Replies !
Problem Uploading Pics
I have a php script that allows me to upload pics and it generates thumbnails of those pics. The thumbnail is viewable in my browser, but the original gives me a 403 Forbidden.
View Replies !
Script To Be Able To Upload Pics?
I was looking for a website software that will allow users to upload their pics to my website(still in the works). So far, i haven't found any. Is there a script in PHP that will allow this functionality or something that can written in PHP to do this?
View Replies !
Sending Pics With Newletter
here the code : include("commun/fonctions_file.php"); $data_html = file_get_contents('page.htm'); $mail_admin = 'contact@myweb.net' $from="contact@myweb.net"; $subject = "Newsletter example.com - ".date("d.m.Y",mktime()); $entete = "From: $site<$mail_admin>n"; $entete .= "X-Sender: <$mail_admin>n"; $entete .= "X-Mailer: PHPn"; $entete .= "Return-Path: <$mail_admin>n"; $entete .= "Content-Type: text/html; charset=iso-8859-1n"; .........
View Replies !
Resizing Pics With GD Library
I've developped a page which allows users to upload pics on the server ; while uploading , the pics are resized (cause they are to be displayed in a 400*400 area). Do you know if it's possible to enable anti aliasing while resizing pics with GD library.
View Replies !
Send Out A Html Email With Pics?
I have a sql db with emails in it and i'll run a loop sending out a mail() 1/ is it possible to send out a html email with pics? 2/ Is it possible to run a sql query and printing results on the email?
View Replies !
Insert Query & Upload Of Pics
i got a webpage where it will insert user profile into database and upload their photos into server.. $addQuery="INSERT into user_tbl(userID,....)VALUES('".$userID."',...)"; mysql_query($addQuery)or die('Error, update query failed'); /********************************** Upload img to folder uploaded_image **********************************/ $imgName = $_SESSION['imgName']; if(file_exists("temp/$imgTitle")) { rename ("temp/$imgName", "uploaded_image/$imgName") or die ("Could not copy file"); } .. how do i ensure that the addQuery or upload of pics do not occur if either one of them has error??
View Replies !
Looping & Reference To Db - Insert Pics At Intervals In Text
I have a page that displays an article from a table named articles -- clever, huh? -- and the relevant fields are text, photo1, photo2, photo3 etc (up to 6). What I'm doing is breaking up the text by line breaks into an array and then printing the items but after an interval of 3 line breaks, an image is inserted from the fields photo2, photo3 etc as long as the photo field is not empty. The first photo field is auto-entered in the HTML so is skipped for this code. Now everything is going OK except that for some reason, the reference to the photo fields are ignored and nothing is printed. I've tried the following code as well as another version where the array of photo fields is created outside this loop, however, either way, the call to the db does not work from within the loop for some reason. Code:
View Replies !
Creates A Temporary Folder And A File Within The Folder.
I have a PHP script which creates a temporary folder and a file within the folder. I have a problem when trying to remove the file and folder using my FTP program. The ownership and group are set to NOBODY. I cannot change the permissions on either the file or the folder. I have tried chmod and chgrp and chown but for some reason I cannot change permissions.
View Replies !
Remove From $name (folder)/(folder)/[x]/ <-- If Exists To Just Get [x].
I'll be quite honest. I don't have the faintest idea how to do this, while I can do other php without a problem. Once I know how to go about it I'll be okay. It's two things I think? 1. see if there's a trailing slash and delete it. 2. Remove the preceding path to /x, the folders and slashes, and delete them. and then I have x. X by the way is the final folder in a website and this grabs it for me. <? $name = $REQUEST_URI; ?>
View Replies !
File In Folder Above Root Folder
I have a .php script in a folder one level above my website root, and I'd like to include it in pages in various website subfolders, some below the root. Can I use ($_SERVER['DOCUMENT_ROOT'] in the path in some way.
View Replies !
How To Get Folder Name Out Of
An easy one for somebody, but I have not got my head round it yet. I need to get the folder name out of a URL ie: /support/desktop/documents/general/fa95e9e698c76fdc606f3b94fe89b48b/17_Import_data_en.pdf $folder = fa95e9e698c76fdc606f3b94fe89b48b;
View Replies !
PHP 5.2 Doesn't Have Ext Folder?
I just downloaded and installed php v5.2, Apache 2.2 and mysql 5.0.27. I'm having the same problems as many regarding the "undefined function" error and am trying to work through it, but I'm noticing (via many of these troubleshooting tutorials) that people are talking about an "extensions" folder and a php-recommended.ini file and the such, and I notice that I don't have either in my installation of 5.2. Did I download the "preferred" installation package? The one I downloaded is called php-5.2.0-win32-installer.msi. I'm coming from a php 4.4.2 apache v1.3.31 and mysql v4.0.20a - all of which was lost during a major crash so I have nothing to compare these 5.2 files against. If I've downloaded a "non-preferred" installer, could someone tell me which one I should install to get everything working properly -- or at the least to have a complete package.
View Replies !
Folder Name As A GET?
I currently have a website and would like to be able to give my members an alias to access their profile. At the moment, people have to go to something like www.domain.com/viewmember.php?id=3456, which isn't practical unless it's through clicking links. I'd like to be able to give my members the ability to use something like www.domain.com/myname, which would then forward to the correct page. The problem I can see is that the server thinks myname is actually a folder and returns a 404 error. Does anyone know of a way to do this?
View Replies !
Folder Within Other Folder
how I do to create a folder inside the other of dynamic form. For former: Year / month / day I tried to create doing this way: <?php $year = date("Y"); $month = date("m"); $day = date("d"); If(!file_exists($year)){ $createsyear = mkdir("$year", 0777); If(!file_exists($ month)){ $createsmonth = mkdir("$year/$month", 0777); If(!file_exists($ day)){ $createsday = mkdir("$year/$mês/$dia", 0777); } } } ?>
View Replies !
Is Php.ini In The Right Folder?
Why do I keep getting the following message below? Not Found The requested URL /php/php-cgi.exe/printerfriendly.php was not found on this server. Apache/1.3.29 Server at localhost Port 80 I have changed the PATH statement to include php.ini I have changed httpd.config on apache. But I can't seem to get any of my php scripts to execute at all.
View Replies !
Is There A Way To Get The Containing Folder
is there an easy way to get the name of the containing folder of a script I know it is possible by manipulating strings using a combination of REQUEST_URI, SCRIPT_FILENAME and dirname - haven't actually coded it but know it won't be that hard. Basically what I want to get from any one of these urls: http://localhost/galleries/ http://localhost/galleries/image.php?blah&blah&blah http://localhost/galleries/displayimage.php?blah is the string "galleries" this code will execute on every page of my site so I would like the most efficient and simplest way of doing this.
View Replies !
Get Folder Name From URL
I'm working on a website - and it is going to have member profiles. I was wanting to set up url addresses for the users like: my.website/username But for the script to work I need to pull the username from after the slash and tell the script to use it to retrieve the profile. I'm sure it's a pretty simple thing - but could someone help me out?!
View Replies !
Set Folder
I installed Apache on my Windows machine. By default, I should put all my files in htdoc folder, which is in C drive. I want to know how do I set in order to allow the link http://localhost/somefile.php refering to some other files in other drive,say files in D:phpafile.doc
View Replies !
CHMOD A Folder To 777
I've currently set up my home computer to run as a server(Apache, PHP3 etc etc) and have been downloading a lot of scripts. In the install instruction for a lot of these scripts it says to CHMOD a folder to 777. Now I'm very inexperienced in php. I do know you can do this from your ftp program. But how can i do this when the folder is on my computer.
View Replies !
Check For Folder
how would i check if there's at least one folder in the current folder? the current folder is $dir/$f/ this is what i have, but i know its wrong $fillle = "$dir/$f/"; if (file_exists($fillle)) {$Q="true";} else{$Q="false";}
View Replies !
Folder Retrieval
I have managed to retrieve a list of pdfs that are in a folder and displayed them with a link to a new window: <?php //RETRIEVES FOLDERS CONTENTS $dir = "/var/www/html/bbcl/building/projects/pdfs"; $folder = "/bbcl/building/projects/pdfs/"; $handle = opendir($dir); while ($file = readdir($handle)) { if ($file != "." && $file != "..") { echo "<a href="$folder$file" target=new>$file</a><br>"; } } ?> But it also display's the name of folders that live there, anyway of specifing what file extensions to appear in the list?
View Replies !
Getting And Using Contents In A Folder
I want to make a photogallery/slideshow with PHP... The 'gallery/slideshow' would show up inside a new window. basically, I just want links with possibility to go: - forward - back - to the very beginning - to the very end - away (close the window) Can I use PHP to determine the contents of the folder with the pictures and then use variables to determine which photo to show, and what URL's should be generates for the arrows? So each folder with a series of photographs would have one PHP file and the pictures themselves in them (it's not a problem to rename them). Should be simple enough, but I'm just starting out with PHP, and I'd like to have something working as soon as possible... the website I'm working on is about to launch soon (my first 'commercial' web project :) ), and this is about the only thing left that I still have to sort out how to do...
View Replies !
Size Of Folder
how i get the size in k of a certain folder on mysite, i know i've done this before but can't think of what to look under at php.net.
View Replies !
Current Folder
Does anyone know easy way to find out the current folder where the script is? I tried to this but it doesn´t work in my Linux web-server, but it works in NT-desktop. $dir1 = getenv(PATH_INFO); $last = strrpos($dir1, "/"); $dir2 = substr ($dir1,0, $last); $name = strrpos($dir2, "/"); $folder = substr($dir2,$name+1,20);
View Replies !
Folder Permission
I have a problem when i create a folder using the following php code: <?php mkdir ("foltest/bleh", 0777); ?> The problem is that the folder "bleh" doesn't have the 777 permission like I wish it did, but it has 755 instead. Is there something wrong with my code, or could this be caused by my host?
View Replies !
Folder Browser
I'm looking for some sort of php folder browser - basically if i have the following folders; index index/welcome help help/email help/web docs in one pull down will display the folders index, help, and docs - where as menu 2 will display the folders that lie in index, help or docs.
View Replies !
The Root Folder
I've a web site in the address http://mySite.com in the root, I've a file index.html I've some subfiolders insid root/sub1/sub2 I like to add an html file (or php) index.html that call the index.html of the root (in order to protect) Now I've created 2 different index.html because I use relative path to design the root (../index.html and ../../index.html) I like to have the same file in all folders,but I don't know how to call the root folder.
View Replies !
Include The Folder
I am looking for a better way to organize my include files. Currently, I have them in a folder, but in the pages that use them, I end up doing include statements for each file. The question is, is there a way to reference the folder name, which automatically will pull all the files in that folder. That way, I can simply include the folder, this will simplify my changes!
View Replies !
Folder Permissions
My trouble might be simple, but I'm quite new to php, and, perhaps I'm even more simple. It's that I had to chmod 777 two folders to get my scripts do what I wanted them to do, and I don't like it. I have a script running on my ISP's unix-apache -server. It is to read string from a form, and create a text-file in a subfolder 'txt' from it. The essential parts of the script is here: $fnam=$HTTP_POST_VARS[filename]; $handle =fopen("txt/".$fnam, "w"); $teksti=$HTTP_POST_VARS[tekstikentta]; touch('txt/'.$fnam); fwrite($handle,$teksti); fclose($handle); Can't be simpler. This script didn't work until I did a chmod777 for both folders, the one where this script is, and the 't' subfolder. Is there a way to get around this?
View Replies !
Folder Loop
i have a folder called "profile_images" how do I loop through the images in this folder, and echo each filename guys?
View Replies !
Getting Contents Of Folder
I've made half of the code for a little "hosting" site for a few of the members of my site. Their files are uploaded to /login/<username>/ I'm now stuck as to how to show the contents of the folder in a page. I think the use of fopen() is needed, however the php website is a little confusing.
View Replies !
|