files

Display files from another directory with mod_rewrite

I have moved all files from a project that should be accessible from outside to a single public directory - so that instead of blacklisting directories that must remain hidden, I could whitelist accessible ones. However I cannot force apache to rewrite this kind of urls: www.example.com/images/flower.jpg to fetch <DOCUMENT ROOT>/p...

Silverlight open file from server

I have task to give in my application possibility to open document that is located on server, but I dont know at all how to implement this. Please give the main idea how can i do this? ...

How to prevent users from accessing files on server ?

I have an application that let users to upload files to server. All files are stored in one directory called Uploaded Files (which has Thumbnails directory inside). What are the most common ways for preventing users to see these files ? I mean I don't want users to see the files by typing URL like /path_to_website/Uploaded Files/1.png. ...

Multi-file Upload in FLEX

Is there a FLEX component that uploads multiple files in a multipart/form-data POST request? ...

Apache need to bypass .PDF files in here

Ok, I'm not fluent in Apache... I have a .htaccess file setup like so: <Files *> Order Deny,Allow Deny from all Allow from localhost </Files> RemoveHandler .php .php3 .phtml .cgi .fcgi .pl .fpl .shtml The Problem is I am needing to use .pdf files to link to a URL like so within this directory: <iframe name="FRAME2" src=...

Android: open file in byte array representation with Intents

Hi guys, I'm a litte bit desperate to open a file with intent so that android can decide which application should handle this file. My Problem is that i have only the file as an Base64 representation which i decode to an byte Array Now i want to send an intent and open that file. I try to do save it in the internal storage and open th...

Plain text vs Database Storage

I need to store a large string that represents music notation in text format. This string could be anywhere between a few lines to several hundred. I need to store meta data about the string (eg artist, instrument etc) in a database. I'm wondering, would it be better to store the large text string in a flat file or in the database? I ...

JQuery Multi File Upload

I have a problem in which I need to upload multiple files using multipart POST request, I need a single browse button to choose the uploaded files. I've seen JQuery Plugin for multi file upload, but there is a problem that only one file is uploaded several times. the post request file parameters are sent with the same name. My question i...

Problems with HUGE XML files

I have 16 large xml files. When I say Large, I am talking in gigabytes. One of these files is over 8 GB. Several of them are over 1 gb. These are given to me from an external provider. I am trying to import the XML into a database so that I can shred it into tables. Currently, I stream 10,000 records at a time out of the file into mem...

Getting iPhone mainBundle Files

I dont know the exact code i need to retrieve all of the filenames of the resources in my iphone apps mainBundle. if i could have some kind of code like: NSArray *array = [[NSBundle mainBundle] getAllResourceFilenames]; it would be helpful. thanks inadvanced for any help! ...

java I/O, writng a array to a text file

i am using the following code to write an array to the file: FileWriter fstream1=new FileWriter("outx.txt"); BufferedWriter out1= new BufferedWriter(fstream1); FileWriter fstream2=new FileWriter("outy.txt"); BufferedWriter out2= new BufferedWriter(fstream2); for(int i=0;i<320*240;i++) { out1.write(0+System.getProperty("line.se...

How do I write only certain lines to a file in Python?

I have a file that looks like this(have to put in code box so it resembles file): text (starts with parentheses) tabbed info text (starts with parentheses) tabbed info ...repeat I want to grab only "text" lines from the file(or every fourth line) and copy them to another file. This is the code I have, but it copies ...

Writing a simple DMS web service in Python

Hello, I recently learned Python and want to do a project just to get my hands dirty and let the knowledge settle. So I was thinking to create a simple Document Management System in Python because I have another project written in Java which needs it. I want the two to be linked by SOAP so the DMS will be a web service. I need the DM...

Creating and writing files with php

Hi Is it possible to pass a variable to 'file_get_contents' in php? Am getting errors and wondered if it was my syntax. Am using the code below. $page=file_get_contents('http://localhost/home/form.php?id={$data['form_id']}'); $fp=fopen('form.html','w+'); fputs($fp,$page); fclose($fp); thanks rifki ...

Find and Replace in a C File

The Problem was to find and replace a string in a C File. I am new to C Files. I have tried the following code but I didnt get any output: #include<stdio.h> #include<string.h> int main() { FILE *f1,*f2; char *src,*dest,*s1,ch,ch1,ch2,ch3; int i; f1=fopen("input.txt","rw"); f2=fop...

File content in Javascript in a Browser

The only way I know to take the contents of a local file and push those bytes to a server is to set up a form post with an <input> of appropriate type to prompt the user to select a file. I would like to do the same thing only pushing the data through XMLHttpRequest (no cross-scripting tricks). Currently, we do this with an iframe to g...

How to delete all occurrences of .BackupManager and BackupManager.list from C:\ drive on Windows 7?

I just bought an Acer Aspire 5551. Nifty little laptop, great price. Last night, I tried Acer Backup Manager for the first time. Besides taking hellish long (compared to SyncBack), it also created a folder .BackupManager in every folder on my C:\ drive!!! What a mess. I would like to delete all occurrences of this folder, and the files ...

Deleting parts of a file with php

After using file_get_contents to write to a html file, I need to delete certain parts of this files contents because the paths to css and images has changed. So I have lines as below : <link href="/Elements/css/main.css" rel="stylesheet" type="text/css"> <image src="/Elements/images/image1.gif" /> I would like to remove the: '/Ele...

php creating editing and writing files

Im trying to use file_get_contents to get contents of a file and delete a certain part of a line in that file. Is the following anywhere near what I want to achieve? $page = file_get_contents('myPage.php?id='.$_GET['id']); $file = 'temp/form_'.$_GET['id'].'.html'; $change = file_get_contents('myPage.php?id='.$_GET['id']); $cha...

Zend - loading resources based on working module

Hi there, I want to load jquery-admin.js while on admin module, and jquery-site.js while on the front end ( site ) module. I also initiated the request from the bootstrap so that I can get Zend_Controller_Request_Http data before the bootstrap dispatches( I am afraid that it doesn't work ) like this: public function _initRequest() ...