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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Copy Files And Folders From One Directory Into Another
I have files in myurl.com/myfolder and I would like to copy all of them into myurl.com/newfolder I'd like to copy all of the subdirectories and files that are in /myfolder and I would like to be able to use a form of some sort to name the file I want to copy, and create the folder I'd like to copy it to, such as newfolder. How can I use a form to create a new folder on the server? How can I use a form to name the old folder I want to copy everything from, then create the name of the new folder I want to copy everything into, and then copy?
Creating Dir, Copy Files And Pass Variables To 2 Files
I need to create a folder on the server weekly named by the user. To this folder copy the contents of an /Original folder. Inside the new folder edit one of the files to insert a data with a XML path generated in another application, copied (via memory) and pasted within the very first form and passed to the file in question. <param name="FlashVars" value="xmlfile= $lanofile" /> the $lanofile is the value that I need to pass from the form to be read by this file. I have created an form (n.php) that POST the name of the folder to a second file (creatdir.php) everything is cool until I have to edit the third file. How can I pass the value of one of the formfileds to a second file and them read this value as a variable to be consumed as mentioned above? Or actually right whatever is on the third field to this position (not using variables).
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:
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?
Creating And Deleting Folders And Files
Hi to Everyone. After creating trought http a organize number of files and folders. I'm not able to delete them, not even trought an FTP Software like Cute FTP. It replies "Could not delete xxxxx.html".
Restrict Access To Folders/files
On a website, I will have several PDFs that I need to make available if user gives correct password or is in a given IP range. My first thought was to use .htaccess, but the host doesn't support that. they do support .htconfig and I didnt find any way of using that to resolve my needs. If there any walk around in this situation using PHP and MySQL?
Generate New Files/Folders For A New User
I am starting to get into PHP and I was wondering if there was a way to have a PHP script that first always a guest to register (which I know there are millions out there). Second I would like after registration is complete, a PHP script will automatically copy and paste files into the users directory. For Example: Bob just signed up on my website with the username Bob123 After he completes the registration, a Script will generate a folder called Bob123 (www.domain.com/Bob123) With files like index.htm and logo.gif in there. Is this possible?
Security Read Write Files And Folders
when i upload files to my webspace i set permission to my files and folders. Im wondering how im unsafe if i grand a folder or file with write permissions to all/everybody. In fact I have the intelligence to understand that ones can places files to my webspace and then execute them. But I dont have the knowledge how to implement it. How can i write to that folder and files?
Copy Files To A Different Dir?
I have a file which is located in "/usr/home/coreyr/html_files" and I want to copy it to "/usr/home/public/html" I've tried the following and I receive errors. <?php copy('sf.html', '/usr/home/public/html'); ?> any ideas?
Copy Files From Remote URL
how can I copy a file from a url into the directory where my php file is located? On the server I use it is not possible to use the copy() function for this task.
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.
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
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?
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?
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.
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.
Creating Folders
I'm a web designer working with a company that needs a website similar to myspace. I'm pretty good with php, so recreating a bootleg version of myspace doesnt seem to hard. However The one element that I am not familiar with is creating folders with PHP. For example a user signs up, and they create a domain name "www.myspace.com/domain" well creating a separate database and all that is easy,but how to I create that folder and php files that need to go inside that folder to create there profile?
Find All Folders
I've been looking around and I can't seem to find a function that will allow me to open a folder and read all the folders inside it.
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?
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>
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.
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.
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.
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']).
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.
How To Turn All Your Pages Into Folders
I've seen websites that have each page as a folder e.g. 45xd remote control car will be at www.domain.com/45xd-remote-control-car/product.php how is that done automatically?
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.
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,
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:
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?
Can Php Create New Folders On Webserver As Needed?
thread formally known as "can php create new folders on webserver as needed?" has changed... i know php can upload files, but can it create a new folder on the webserver? i am trying to create a "directory" with each person having his/her own folder for images. As a new person joins, i want a new folder that is named after him/her created for storage of his/her personal images. if php can, please let me know of scripts or functions that can be used to create new folders on a webserver...
PHP File Management With User Folders.
I'm looking for a script / scripts that will allow me to control files that users can download. I would like to create 'General Folder' that any registered user can download from and private folders that only the specified registered user can download from. This needs to be simple to manage and simple to download from.
Include Path Problem, Sub Folders
I am new to PHP and facing problem in including header, footer, left navigation and right navigation files to the pages. I have a includes folder with all the including files in the root folder. <root folder>/includes/files.php These includes files are working fine in the root folder and there sub folder. That is <root folder>files.php <root folders>/sub folder/files.php But for the files of sub folder of sub folder it is not showing correct path. The images are link are not taking the correct path. That is the wrong files are <root folder>/sub folder/sub folder/files.php I went through many articles on the same subject and got to know that i should give path like '/includes/header.php'. I didn't know whether i got it correct or not. Please comment on this. But this is also not working. Error is like this: Warning: main(/includes/header.php) [function.main]: failed to open stream: No such file or directory in ....
Php To Search Folders Of Pdfs -where To Start? -
I am an scriptor looking into writing an application that would search pdfs within that are stored in MySQL. Not being too familar with php, I am wondering if it would be a good language to do this, as in are there already modules for this type of work, or should I be looking into a different set of programs to do this more easily? Basically I...
What Image Url To Use For Pages In Different Folders/subfolders?
suppose in my root folder i have image.jpg page1.php ->subfolder and inside subfolder i have page2.php if i want to insert image.jpg into both page1.php and page2.php, and i want to use only one and the same image URL for both pages, how should i do that? Code:
Saving A Php Created Graphic To Two Different Folders
how I can save a php created graphic to two different folders? I want to save the graphic to the images folder that is in the folder that has the php code. The other folder will be in a different location that php code folder. Here is my code:
How To Configure Apache To Serve Data In Different Folders
I want to configure my apache server in such a way that it can be able to serve contents in two different folders like localhost1 serves directory1 localhost serves directory2 I have tried harder to work with apache virtual host but can't get my target NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost1 DocumentRoot c:/directory1 </VirtualHost> <VirtualHost *:80> ServerName localhost2 DocumentRoot c:/directory2 </VirtualHost>
Creating Predefined Folders In A Bunch Of Folder
This can of course be solved with other things than php, but since I write php myself I was looking for a solution using it. The problem is:I have folders set up like this /letter/id/ (ie. /g/132/) What I would like to do is run a one-time operation that creates a totalt of four predefined folders in each /id/ ... The script would have to go through all letters (ranging from a-z) and make these folders in each /id/.
How To Access The Other Mail Folders Besides The Inbox Folder
How does one access the trash and other folders using PHP and pop3? my client program only shows the contents of the inbox (quite naturally I guess coz I always use 'INBOX' with my imap_open() calls. issuing imap_open with 'TRASH' doesn't seem to be ok. can this be done with imap_header_info()...and could someone spare a rough script or pseudo code to do this. can we work with folders using imap?
Permission Denied Error When Trying To Delete Folders On Windows
I'm trying to delete a folder from my php script using rmdir, but I keep getting permission denied errors. Creating folders and creating and deleting files within them works perfectly OK, but I can't delete the folders. I'm using Apache on WinXP and have tried using various solutions I've found in various messages, but nothing works. I've tried setting partial and Full Control permissions for the Apache user, the Apache group, the IUSR_(machine name), everyone and even turned on the web sharing write permissions at every level from the folder itself right up to the top level on the partition. All the files in the folder have been deleted before the rmdir, so I don't think that's the problem. PHP Code:
Copy()
I'm trying to get this image upload function to work, and I'm stuck at a seemingly simple problem I can't solve. Here's the file with everything all-inclusive: Code:
Copy()
I am trying to copy an image to a directory. I got it working on its own, but can't get it working in the shopping cart admin area. any thoughts?
Copy Everything Between X And Y?
I'm trying to do what I figure is the opposite of preg_replace. I need to copy everything between two constant/known words in a string, e.g $string = "I am going to the market to buy eggs and bacon for breakfast"; or $string = "I am going to the market to buy fruit for breakfast"; How can I get 'eggs and bacon', or 'fruit', or whatever else is in between 'buy' and 'for breakfast'?
No Copy
Does anyone know how to make it to where no one can right click and copy a bunch of important data off of you page?
|