Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Viewing Files In A Web Folder


I'm trying to put my files in a web dirctory.  All kind of files, so that in the future when I need something I just go there and get them.  My goal is that when I type "www.domain.com/myVitualDirectory" I would get my list of files and folders and files and I would even be able to navigate into the folders, then I would right click and Save Target As and get my file.




View Complete Forum Thread with Replies

Related Forum Messages:
Viewing Image From A CHMOD Blocked Folder
How can I show an Image that is inside a folder which I've blocked using CHMOD?
The reason I've blocked the containing folder of the Image is so no one could enter the folder's URL and see ALL of the images in it.

For Example: I have a file that is viewing the "Dog" photo from the Blocked Folder "Private_Images". In that case I cannot view the dog's file because the "Private_Images" folder is blocked, but if I will remove the blocking from the folder, then anyone could view all of my other photos.

View Replies !
Viewing Php Files?
Only just started with php and wondered if there was some easy way of viewing on my pc, what the results of that page are, (not the code) please?

Not sure if I've explained it properly, but when I'm working on my .html files in my editor, I can switch from 'code' view to preview mode to see how the page is working out - is there any *easy* way of doing that with the php files?

View Replies !
Editing/Viewing Flat Files
I'm making a simple events listing; where the user logs in, adds events (in fields, pull downs, textarea, etc) and then posts it (via a flat file). Now, first question, how do I make it so tha the characters (such as ' or ") display without a / next to them (I'm sure it's a string command, not sure which one to use).

Second, how can I make it possible for them to view inside a textarea and edit, but not have it show the HTML code that is generated by their creating the event (their field entries are nested within tables, etc). Is that possible via some sort of find and hide thing (I don't want them to see the <table><td>, etc tags, but I don't want those tags to disappear when they want to edit their events).

View Replies !
Protecting Unauthorized Viewing Of Non-php Files
My site requires users to log in. Each php page ensures the user has
been authentiated and will redirect to the login page if need be.
However the site
also has a directory of PDF files that should only be displayed to
authenticated
users. My problem is, a user that knows the pdf file name can simply
enter in
the URL for the pdf and apache will serve it up.

How can I protect assets like pdf files from being served when a user
has not
been authenticated ? I tried using an .htaccess file, but it prevents
apache
from serving the pdf even when the user has authenticated using the
login php
page. This seems like it should be easy to do...

View Replies !
Stop People From Viewing Php Files
I have a bunch of php scripts that get information from a database then mark it up in XML.

I want to prevent random people from running these pages and being able to look at the XML.

How do you accomplish this while still allowing my flex app to see them?

View Replies !
Viewing WordPress PHP Files On Local PC
I am looking for a way to open WP's files on my local machine that will allow me to view them "in a clean" - line by line - way.

In other words, I'd like to view the code in a way that I could begin to understand the step-by-step logic of the code. What is the trick, if any, that might allow me to somewhat unscramble the code? Code:

View Replies !
Drag Files From One Folder To Another Folder (copy) .. Possible?
Is it possible to write codings PHP or Javascript.. GUI representation
of File handling (ie. Drag files from one folder to another folder (copy)
like our windows).. pls give me some reference codings like this..

View Replies !
Firefox Keeps Wanting To Save The Files Instead Of Viewing It
I installed Apache 2 and PHP 5 so I could view my php files locally. However, Firefox keeps wanting to save the files instead of viewing it. IE views them fine. How do I view them in Firefox?

View Replies !
How To Detect Number Of Files And Files' Name In A Folder?
I have a server built in window + apche. I am trying to make a photo album, but I don't know what is the code for detecting the number of files in a server folder and the files' name~.

View Replies !
Files In A Folder
I need a script that checks for the amount of files in a folder. Is taht possible with PHP.

View Replies !
Files In Each Folder
I'm looking for a script that will display how many files I have in 5 of my folders. for example.

Folder 1 ( 2 files )
Folder 2 ( 0 files )
Folder 3 ( 15 files )

View Replies !
How To Get The Files Names From The Folder Using PHP ..
How to get the files names from the folder using PHP .. is there any
specific command. If yes let me know that..

View Replies !
Paging Of Folder Files
i have a form which has a select button when user clicks it a popup opens which shows all images in abc folder
 
when user clicks on any image the window closes and the name of that image is entered in the text box in parent form, now its working fine uptill here but if user refresh the popup window then it disconnects from parent window so my code that fills the textbox in the parent form and closes the popup window does not work anymore im using it like parent.document.form.texthox.value=abc since popup window is refreshed it does not work as child any more and this code does not work.

View Replies !
Files And Folder Copying
I am trying to write a function to copy an existing folder and folder
structure but am already stuck.

What I want to do is the following:

Copy a default folder (default_folder) and all sub folders within it (down
to a possible 4 levels)
eg default folder
->subfolder1
->subfolder2
->sub subfolder1
->sub sub folder 2

I have a form where the user can enter the name of the new folder and an
option to confirm if they want to copy the files also located within the
default folder.
If the checkbox is not checked then copy just the folder structure only

Can this be acheived in one function or will it be based on 2 where a set of
empty folders are created and where the folders and files are copied over

View Replies !
What Is The Max PDF Files Allowed In A Folder?
Not sure where to put this question? I am building a book archives database with a front-end for some librarians. They want to upload book cover images onto the server (probably Win-NT). There are approximately 80000 records that will have the book cover images stored in a PDF document for each. Can I upload every PDF to the same folder? Is there some kind of limit for a folder?

View Replies !
Deleting Files From A Folder...
I have a folder with many pictures in it.
All have the name like: HHMMDDMMYYYY.jpg

H-hour
M-minute
D-day
M-month
Y-year

Now I want to delete all pictures which are older than now()-7days.
How Can I do it? In SQL would be no prob but with file deleting is problem.

View Replies !
Opening Files In The Same Folder..
I have a php file (1.php) that needs to open another php file (2.php) and parse it's output. 2.php gets it's data from an xml file and formats it in a pretty screen style. So what I need is something like: $fp = fopen ("2.php?file=file.xml","r"); but that wont work because there is no file called &#392;.php?file=file.xml' so how's it done?

View Replies !
Root Of Folder App Files
While I know putting a app into a folder was chiseled out of fine
scottish granite and carried upto the top of ben nevis by php newbies
many years ago - I dont think a folder is the best way to do it .

The fact a script is in a folder means certain instant problems if you
want to do certain things with .

Assuming a script doesnt have index.php and all the script files have a
filename prefix like phpgb_ then theres no chance of them clashing with
anything else and theres no real reason to continue using a folder for
the main script files .

While the script will have a app folder for various things - does it
make any sense not to use the root because of a single solitary file
called index.php .

phpgb_index.php is what I use and the method hasnt brought up a single
problem of any shape or description .

Gas lighting was once what everybody thought was the best way of doing
it until that darn new fangled electricity came along .

View Replies !
1 - 2 Millions Files In One Folder?
I have to store over a million files, 10 - 15 kb each, in one folder.
The files are created by my php script, sometimes the old files are
deleted and new ones are written.
So, basically on every connection my script reads/deletes/ writes files
from/to that folder.
Right now i have only around 300 000 files in that folder, and it feels
like its getting slower for that script to work. It does work at the
moment, but i am not sure what will happen when there is over a million
files there...
Are there any limits of files that can be stored in a folder?
Would it be better for me to use mysql? I am not sure how mysql will
cope with millions of writes/reads

View Replies !
How Does One Get A List Of All Files In A Folder?
need a list of all files (i have like 5k or so) in a folder, I need to add there names to a table

I am doing this so i can compare two tables

table 1. comments added to uploaded pics -finished pictures-
table 2. no comments added yet to uploaded pics (so they can be commented on GET IT?)  -unfinished pictures-

All the pictures are in a single folder for the time being i'm going to be making a form based on the pictures that are on table 2 so that they can have comments and titles and file name added to table 1 (to be done still) but i need to know all the file names for the folder in question, i guess i could do it via cmd line ls or something like that, i'll get back to you.

View Replies !
Pagination W/ Just Files In A Folder?
Example would be:

prev 12345 next

but doing this with just files and not DB records?

View Replies !
Php Include Files From A Folder
I want to make a folder filled with blog posts by date.  Each file will be like 20071113.php and 20071031.php basically the date they were written 2007, 10 for october, and 31 for the day.  But each will be notated like that so that the number is always increasing. 

How would I make a php include function as to take the last ten highest numbers and add it to a page? (Basically the last ten posts by date) and  How would I include more than one post per date?

View Replies !
Counting Files In A Folder
I want to count how many images are in a file.. all are .jpg some .JPG .. how can i do this??

View Replies !
Folder With Files From Server To Another
I am trying to transfer a folder with files from server to another.

I found a script online and it sort of works. What it does is copy files from the root folder (which it shouldn't) and puts into the folder I am trying to copy from.

What I need is it to copy from the $ftproot into the $srcroot/$srcela folder.....

View Replies !
How To Count The Files In Each Folder
I'm using this:

<?php
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/$login"; 
$images = count(glob($dir_path . "*"));
?>
now, <?php
include "scripts/connection.php"; 
if (!$con) 
{ 
  die( 'Could not connect: ' . mysql_error() ); 
   }
mysql_select_db($db, $con); 

$result = mysql_query("SELECT * FROM album WHERE active = 'yes'");
?>
how can i get it to count the files in each folder, ie <?php 
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/client1";
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/client2";
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/client3";
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/client4";
$dir_path = "/var/www/vhosts/website.co.uk/subdomains/demo/httpdocs/clients/client5"; [/code

View Replies !
Copy Files From One Folder To Other Using PHP?
how can i dopy files from one folder to other using PHP? exactly i need to select some files on the server then after clicking submit those files should be copies to a local directory from the server.



View Replies !
What's Your Folder Structure For Your Files?
So, I'm looking to get started on my first application, and my first question is about folder structure on the server and what are the best practices?

When I create static content today, I create one folder per page usually to keep things organized. Any components are included in the related folder, and global components are added to a top level components folder.

I realize the dynamics of PHP will reduce the need for hundreds of pages, and that's why I'm excited to learn this language. However, I still need to keep even the dynamic PHP files and components organized.

I've seen some sites, where people put all their PHP files on the top level folder. Just wanted to get your feedback on how you guys keep your server folder structure organized?

View Replies !
File_get_contents From Files In A Folder
$dir = 'matchreports';
$dh = opendir($dir);
             while (($file = readdir($dh)) !== false){
        $fullfile = $dir . $file;
        $subtotal[] = file_get_contents($fullfile);
I am getting this msg "Warning: file_get_contents(matchreports010407.php) [function.file-get-contents]: failed to open stream: No such file or directory"

010407.php is one of the files i need to retrieve the contents from, including others from the folder.

View Replies !
View Folder Files
i am looking for a script (in php) which would list the contents of a certain folder on my server and be also able to delete selected files.

View Replies !
Security Of Files In A Folder
I'm creating a database for old tests that people have taken. The tests are scanned in and stored in a folder on my server. In order to see them and navigate the many pdf files, you have to login with a username and password. I know how to do all that, but how can I password protect. pdf files on my server so that they can only be accessed from the point after the user has logged in? Everything works dandy except for the fact that people can directly link to a. pdf file (a huge security risk). Also, if I don't password protect the directory of the pdf files, can webcrawlers find the information and store it in their search database?

View Replies !
Putting Files In A Folder
I have a script that makes PHP files. I would like to put them in a separate folder. I mean I want the script to be in a folder and the files it makes in another folder.

View Replies !
Download A Whole Folder Of Files
Is it possible to let a user download a folder with several files? For example a folder with many jpg files? I mean when the user presses a download button or link he will automaticly be downloading all files from the folder.

View Replies !
Number Of Files In A Folder
I want to use a loop to list the file names in a folder. How do I find out the total number of files in the folder so I know when to end the loop? I can't use 'file exists' because the file names could be anything.

View Replies !
Sort Files In A Folder
I've got a bit of a problem. I found a script that reads files from a folder, and I modified it so that it can read image files and give extra info about them. but it only sorts the files by alphabetical order; I want it to sort them by date as well. I've been tinkering with it, but all to no avail. I only got it to sort the files by reverse alphabetical order (rsort()). Here's the whole script:

<?php

$folder = 'http/path/to/folder/';
$imgdir = 'absolute/path/to/folder';
$allowed_types = array('png','jpg','jpeg','gif');
$total_images = count(glob("$imgdir{*.gif,*.jpg,*.png, *.jpeg}", GLOB_BRACE));

?>

View Replies !
Indexing Text Files In A Folder
I'm newbie on Php. I cannot write codes but only modify.
I need a code doing this:
I'll put text files in a folder like file1.txt,file2.txt ...
I want to search this files, list most recent 10 and if files

call, script will put into the site design with <pre> tags.

View Replies !
Dropdown List Of Files In Folder
I am preparing a form that includes a drop-down list consisting of the names of files in a certain folder on the server.

I only need to trap the file name (jpg), not the path and I'm not trying to upload the files or anything - simply allow the user to select one of a number of different image files (they're actually location maps).

View Replies !
Recursive Copy Of Folder/files
I want to copy entire content(have both files and folders)from One folder to destination folder..

View Replies !
Opening All Text Files In A Folder
Im very new to php and need a bit of help. basically what I have is a folder with a number of text files inside. What i need to do is open every text file in that folder and then process the information inside each text file.

Im not really sure but I would assume I open the directory and place the name of each text file into an array and then loop through the array and process the contents of the text file.

#open directory

#foreach text file in the directory
#store file name into an array

#loop through array
#process code

View Replies !
Display A List Of Files In A Folder
How do you display a list of files in a folder and then delete one by clicking on it?

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 !
How Can I Return The Number Of Files In A Folder?
How can i return the number of files in a folder?

View Replies !
Return All The .html Files In A Folder?
I'm trying to find all the include files in a folder is there a way to some how read a folder and then return an array with all the file names as the array keys or associative keys? I only want to return files that are .html or .php not all files

View Replies !
Count Files In A Remote Folder?
Anyone have a simple function or snippet that can count files in a remote folder?

View Replies !
Show Html Files In A Folder
I am trying to create a script that will parse the folder it's containing php page is in for html files. Create a drop down list of links to the html files.
Anyone know how I might do this?

View Replies !
List Of My Files Within A Folder / Directory
how can i create a dirlist.php file so i can view just a list of my files within a folder of my website?? So just the files are listed?

View Replies !
Count The Number Of Files (.jpg) In A Folder
i need to be able to count the number of files (.jpg) in a folder and should display all images. why?

View Replies !
Random Select 5-10 Mp3 Files In A Folder
Does anyone know how to create a script to randomly select 10 or 20 mp3 files in a folder/subfolder to create a playlist?

View Replies !
Upload Files To A Safe Folder
I can upload files to my root directory files are. But it requires ftp users to access it , and i only got 5 accounts. I want visitors on my website to be able to download content without verifications or anything of that matter. How do I do that?

I know that people can get hacked i believe by uploading a file to the root directory and doing something with chmod watever that is. how i upload files to a safe folder(how do i create a safe folder), where visitors can download from? Without any security leaks

View Replies !
Uploading Files To A Folder Structure
I am having problems uploading files to a folder structure on the server and am not to sure as to why this is happening. I have this code which is the upload script: PHP Code:

if (isset($_POST[uploadbutton])) {
   $tempimagename = "TMP" . $_FILES['myimage']['name'];
   $newimagename = $_FILES['myimage']['name'];
   
    // other code here that is irrelevant etc...

   $filedestination = "../myimages/" . strtolower($newimagename );

   if(move_uploaded_file($_FILES['myimage']['tmp_name'], $destinationimage)) {

   // other code here etc...

  }

The problem I am having is that it fails to upload each time and I am not sure if it is a permissions thing. My '../myimages' folder is CHMOD 755. Is there a way of adding code in that changes the folder to CHMOD 777 then chages it back again or is this not good practice?

View Replies !
Opening Files Outside The Webserver Folder
The disk space of the drive where my webserver folder is located is low. So i decided to put the other files in a separate drive outside from the webserver folder. I made my page in windows desktop. and i used this commands to open the file. and it works.

$filename = "D:/biography.html";
include($filename);

when i transfer my code into the server which is mac it won't work. i already change directory in mac. I hope someone would help me with this?

View Replies !
Deleting Files In A Folder Modified Before Certain Date
I use a cache system that requires creation of files in a folder .

Now , what i need to know is how can i delete files created say 3 days ago.

So that the cache remains fresh.

The directory contains around 20,000 files , about 10,000 are generated each day (if they dont exist)

So getting info about the each file after using opendir will cause the server to slow down.

View Replies !
Download-scriptto DL Files Outside The Public_html Folder
I have a small Linux webserver, and want to find a (php) script
that lets my users download files located outside of the public_html
folder.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved