Mkdir() How Do I Automatically Make A Index File And A Css File
using mkdir() how do i automatically make a index file and a css file. what i really mean is once the directory has been made how do i make it so i have a index and css file there, its just because im making a forum hosting service and i need all the files automatically set up in the directory. how can i do this?
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
Mkdir - Copy Function And Fopen To Make A New File
Ive got a script where people can sign up and a folder is created with their username as the name of it. I also want to copy files to that directory using the same script but everything Ive tried doesnt work. Ive tried using the copy function and also fopen to make a new file but none of them have worked. Code:
View Replies !
View Related
How Can Make Txt File Automatically Download?
I recently created a script that creates a txt file in a randomly named folder within a specified folder. I would like to know how I can make this txt file automatically download? I have heard of placing the URL within an iframe or even using a meta refresh tag to download it, but since I'm working with a .txt file, by default it would load the file within the browser instead of present the user with a downloadable file. This is an inconvenience to a lot of people because then they have to manually save the file (I wouldn't mind, but a lot of other people would). By the way, the download link is parsed with PHP. ;) Not sure if that matters.
View Replies !
View Related
Mkdir Warning: MkDir Failed (No Such File Or Directory)
everytime i use mkdir to create a directory it works with a relative path like ../this/path/folder but it seems to quit on me if i use /home/user/this/path/folder for some odd reason, it is giving me this error Warning: MkDir failed (No such file or directory) in c:apachehtdocsmyscriptadd_person.php on line 12 p.s. YES i have permissions to write on this drive, it works fine with a relative path, just not with an absolute path
View Replies !
View Related
MkDir Failed (No Such File Or Directory)
I'm trying to create directories from a variable but all i get is MkDir failed (No such file or directory) in blah blah blah line 30... i tried different modes (ie. 666/777/757) but always get the same error. the directories must be created in the same folder as the php file as subdirectory. PHP Code:
View Replies !
View Related
Chmod Mkdir And File Permissions..
I'm trying to create directories and move files with the right permissions. When I make a dir using mkdir I'm setting the permission to 777 to my folder variable $t2 below, but when I check the chmod it's 755? When I copy files over to this folder the file permission are set to 644 and I can't even get rid of them on the server because it won't allow me to delete them. Is there anyway to set permissions to a file as you're using the copy function? Code:
View Replies !
View Related
Make A Configuration Of Php.ini File And Sendmail.ini File.
i have a problem with make a configuration of php.ini file and sendmail.ini file. It simply doesn't work. I'm working on apache server (fake) and I install php, apache and mysql with xampp installer. Erorr apears: SMTP server response: 550 5.7.1 Unable to relay for psenkodej@yahoo.com in C:xampp estchapter 11sendmail-rev03.php on line 29...
View Replies !
View Related
No Libphp4.so File Created In Make Intstall Or Make.
I have done a make, and a make install on the 4.3.6 version, using /usr/local/etc/php as the directory I make from. However, no matter what I do, I do not see a php4lib.so that has been created. The documentation I recieved (an IBM source) says that the following has to be added to the httpd.conf file : LoadModule php4_modulelib/apache/libphp4.so .. .. .. AddModule mod_php4.c here is the output from my make install : [root@mail php]# make install Installing PHP SAPI module: cgi Installing PHP CGI into: /usr/local/bin/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar - already installed: 1.1 [PEAR] Console_Getopt - already installed: 1.2 [PEAR] PEAR - already installed: 1.3.1 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path [PEAR] DB - already installed: 1.6.2 [PEAR] HTTP - already installed: 1.2.2 [PEAR] Mail - already installed: 1.1.3 [PEAR] Net_SMTP - already installed: 1.2.3 [PEAR] Net_Socket - already installed: 1.0.1 [PEAR] XML_Parser - already installed: 1.0.1 [PEAR] XML_RPC - already installed: 1.1.0 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config program: phpextdist
View Replies !
View Related
Make A Php File Return A Zip File?
I need help with writing a script that returns a zip file. if(1 == $download){ // Setup headers for zip file // Return zip file // Afterwards, display previous php page } Can you help with fleshing out the function. I think I have the basic idea of what needs to be done, but I don't know what the syntax is.
View Replies !
View Related
File Automatically Being Deleted
Whenever index.php or .htaccess are created in a directory, they are automatically deleted. I'm guessing it is some kind of backdoor attack. Setting permissions to read only didn't help. Does anyone know how to see what is deleting the file? or protect it?
View Replies !
View Related
Automatically Transferring A File
I've been looking all around the internets for a solution to a little problem I'm having with my latest php based website, which just happens to be two other things too - my university dissertation, and a major pain in the head. The problem is, once one script has uploaded, processed, and saved information to a database, the file needs to be moved to another server (one is fast at processing, the other has 2Tb free space) for the indefinite hosting. I can't seem to do this with PHP's FTP functions and I'm assuming this is because of the limitations of PHP's file handling ability. Is there a possiblity to do this using exec() and Fedora's built in FTP programme, or something similar? The filesizes can vary from around 10mb to maybe 300mb. Both servers are on fibre links so speed isn't a problem. I'd thought FTP through exec might work, but can't figure out if FC4 can accept a complete FTP function in one go. If it helps, I've got root access to the main server where the scripts are hosted.
View Replies !
View Related
Save File Automatically
Is there a way to have php automatically save a file that is being downloaded without having the annoying "Save As.." dialog box that appears? I would like to be able to create a txt file on the server and automatically have it save in a user's specified folder.
View Replies !
View Related
Automatically Include A File
I've got a PHP file with custom functions that I commonly use. I want that file (functions.php) to be included every tiem PHP is executed. I tried including the path in the php.ini as the include_path, but it doesn't seem to work. The error I'm getting is : Fatal error: Call to undefined function I'm running this on Win32 (Windows XP), with this PHP build : PHP 5.0.5 (cli) (built: Sep 5 2005 15:54:44) Any ideas as to what I'm doing wrong?
View Replies !
View Related
File Handling - Automatically Remove
if i have a file structure as follow: suppose A is the parent folder and it has sub-folders (-->)... for example folderA-->folderB-->folderC now in php, if i want to remove folder A....how can I automatically remove also all the files in folderB and folderC in the file server?
View Replies !
View Related
Sending Information To Another File Automatically...
Im just having issues sendind some data from one file to another automatically without the users input so far I have: echo "<form method='post' action='contest.php'> <input type='hidden' name='previously_entered' value='already_entered'/> </form>"; } and on the contest.php I have: $previously_entered = $_POST["previously_entered"]; if ($previously_entered == already_entered) { echo "<td class='mediumText' valign='center'><font color='red'>Sorry, but you have already entered!!</font></td>"; } else { echo "<td>", tep_draw_separator('pixel_trans.gif', '100%', '10'); "</td>"; } But with the code I have that's action is contest.php, it doesn't automatically goto contest.php. Now, I haven't done any php or html in a while so call me a "Newbie" but I can't for the life of me remember howto setup forms to automaticly forward that data on... if you get what I mean.
View Replies !
View Related
Automatically Emailing An Excel File
Initially I had to make a php page that would email each week information about new members of a site... That was fine I just used a cron job running the php page weekly... Now I've been asked to set up the email so it sends an Excel file of the data automatically... Does anyone know if this would be even possible?
View Replies !
View Related
Automatically Renaming An Uploaded File
I am creating a page to upload files, as well as to submit data about the file to be stored in a database. When the form data is submitted, how can I program it to automatically rename the uploaded file to the ID or Key number of the record in the database in which the file's information is stored?
View Replies !
View Related
Automatically Create An XML File, For An RSS Feed
I'm pretty new to PHP, so please keep any answers simple. I have my MySQL database setup for a list of articles I list on my site. I use PHP to pull the data from the MySQL table onto my articles page. I was wondering if there was a way to automatically create an XML file, for an RSS feed, of the articles in my database.
View Replies !
View Related
Automatically Download A File When A Window Opens.
I'm not sure whether I would use PHP for this or not, but what I am trying to do is automatically download a file when a window opens. I have a page with a link on it. When the link is clicked, a window pops up with a link to a file in it. I would like to be able to have that file start downloading as soon as the window opens. I'm not sure if this would be PHP or Javascript- any help would be nice.
View Replies !
View Related
File Upload From The Imagefolder Automatically. Without Prompt User
I have a problem and the problem is – I want to upload file to the server from a folder automatically. Like- I have a folder & name is- `imagefolder' and there have 10 or more file (e.g. gif, jpeg etc.). And I have a `Upload' button. When I will click on this `Upload' button the Fill upload process will be start without prompt user, and file will upload from the 'imagefolder' automatically.
View Replies !
View Related
Index.php Shows Up As 'download File'
Let me start with my setup: SuSe 9.2 Apache 2.0 PHP 4.4.7 MySQL-community-server 5.0 MySQL-community-client 5.0 So here's the thing. If I point my browser to http://www.myshellhost.com it's fine. http://www.myshellhost.com/index.php is fine. http://myshellhost.com is fine. http://myshellhost.com/index.php brings up a 'Download File' prompt... o.O Anyone have any ideas?
View Replies !
View Related
File Upload Notice: Undefined Index
I have a form containing text input, checkboxes and a file upload (all in one form). The file has the a name = foto. When I try to check the name of the file in nieuwsVoegToe.php I get Notice: Undefined index: foto in C:InetpubwebpubNavigatorhtmlpublic_html ieuw sVoegToe.php . I use $_naam = $_FILES['foto']['name']; to get the name of the file. Someone knows wat's going wrong? // THE UPLOAD FORM <form name="nieuws" method="post" action="nieuwsVoegToe.php?actie=nieuw&IDN="> Titel <input class="grijs" name="titel" type="text" size="40"> <textarea class="grijs1" name="inhoud" cols="80" rows="8"></textarea><br><br> foto toevoegen? <input name="fotoToevoegen" type="checkbox" value="1" onSelect="EnableInput();"><br> <table class="grijs" bgcolor="#EEEEEE" > <tr><td> selecteer je foto: <input type="hidden" name="MAX_FILE_SIZE" value="20000"> <input type="file" name="foto"> </td></tr> <tr> <td> // radiobuttons here </td> </tr> </table><br> <input class="grijs" type="submit" value="nieuws toevoegen >>"> </form>
View Replies !
View Related
Variables - Index File That Contains My Head And My Footer
I am trying to do is have one index file that contains my head and my footer. Then for the main content <?php @ require_once ("$page.html";?> then for the url index.php?page=about Now the thing I was reading said this ---> <removed copy paste from other site - jatar_k> What I really want to do is have a the content change on one index file so I do not have to copy php code throughout the website and it would seem that this would be one way to do it.
View Replies !
View Related
How Do I Resolve To A Default Index.file On Webserver.
I'm trying to fiqure out a way to have my webserver URL call an index file with a '.php' suffix rather than the standard '.html' suffix. Here is what I don't understand. When a user calls my website through a web browser, my understanding is that the URL will look for a default index.html or index.htm file on the server (since this is the file my webserver administrator told me to upload in order for a user to resolve to the site). Is it just a simple request to my webserver administrator to just change the default index files to a '.php' suffix rather than a '.htm' suffix. The reason I want to change is so that I can use cookies to test whether a member is already registered on the site. I've notices sites, like this one, that recognised that I'm registered and displays that information in a box. You can only do that via a php files, right?
View Replies !
View Related
Automatically Make A New Page
I managed to submit a post to my mysql data base. And then display it on the main page I did all this buy reading tutorials and am still very unsure on how it all works. I think I got some basics though. I submitted my post is there a way to get it to make the post turn into a link which will open a new page where I can let people reply to the post like any normal forum but I want to make my own so I can learn how it all works.
View Replies !
View Related
Run The Index.php File In The Browser And Get A Blank White Screen.
I'm running Win2003 Server with IIS, PHP 5.2, and MySql 5. PHP works in some cases, for example, I have phpMyAdmin running fine, WordPress running fine, and a few other basic sites. However, I've tried to install other PHP applications (the case at hand being OS Commerce), where it seems the PHP code doesn't run. I install the files, run the index.php file in the browser and get a blank white screen. I've checked for the opening tag issue <? vs. <?php and everything is set to <?php. I'm wondering if there is a setting in the php.ini file that I am missing? Not sure what to do next.
View Replies !
View Related
Automatically Make Text Into A Link
how do I make php search through a $_POST[variable] for a certain set of string, lets say R1000000. Then I would want to turn that string (R1000000) into a link <a href=example.php?id="R1000000">R1000000</a>Then append that link back into the original $_POST[variable] replacing the R1000000, with the link version. I'm sure this is doable, I just have no idea where to start, regex?
View Replies !
View Related
Make The .po File
How can i use gettext in windows 2000 problem in compile .po file. how can i make the .po file. tell me in detail step by step. also unable to find msgfmt.exe, libiconv.dll, libintl.dll to compile .po file in windows.
View Replies !
View Related
How Would You Make A File Upload?
How would you make a file upload? Like let the person on that site wants to upload a .swf file.. heres some stuff i want to make sure: 1.)Make sure the file name is .swf 2.)Put it into my file name (if they uploade something like my movie.swf, it goes into (id#).swf
View Replies !
View Related
PHP Make A File & E-mail It
i have a page on my site where i add a user with a username, password and e-mail address. now what i want to do is make it so when i click sumbit it makes a file called $membername.cfg then i want it to e-mail that person with the CFG as an attachment but i aint a clue how been looking though these forums to no avail?
View Replies !
View Related
PHP Form To PDF File - How Do I Make PDF Secure?
I have a simple PHP form that grabs names and emails of everyone that wants to download a PDF file. When the required info is entered into the form, it gives them a link to the PDF which they can download (no problem so far). However if they then wanted to send that PDF URL to other people, they could just bypass the form and just download the PDF directly. I’ve seen references to this question in a few places, but no answers, can someone give me some ideas how I secure the PDF, or guide me to a tutorial?
View Replies !
View Related
How Can I Make This <?php Include..?> File More Effective??
this is the code i am using to include my header. the issue is that the embeded swf, the first one, will not show on IE. this is giving me a headache because it will show even if i write a dot (.) right after or before the <?php require_once..?>, which is crazy. will also show if i add any other kind of code like <!--<?php header("Cache-control: private");?>-->, yes, and an error message with it. i checked for extras space and there is none. i just don't know what to do to it to make it work. my head is spinning here. Code:
View Replies !
View Related
Make A Decent File Manager With Php?
how would you make a decent file manager with php? i know there is a php function allowing you to list the files in a certain directory but i can't exactly remember what it was. i remember it also put like a < or something in front of each file and i'd like to remove that.
View Replies !
View Related
Make Ibdata1 File Smaller
I use relational databases with foreign keys using innodb tables in mysql 4.x and 5.x. One thing I /think/ is true about the file innodb data is stored in (ibdata1 on my Linux server) is that it is assigned a large size initially - cause I notice it doesn't change in size even though innodb table data is being added. Am I mistaken on this? In other words, the size in bytes on my ibdata1 file is 1,344,274,432 and it never seems to change even when I insert data in those tables. My thought was, can I cut it down to maybe half that size? There is NO WAY I need a gig of innodb space for a long time and I think it might run faster.
View Replies !
View Related
Make A Table With A Text File
I have a text file containing those lines -={P.A.G}=-Draven|669078528|668468420 -={P.A.G}=-Andy[UK]|676938876|676919330 -={P.A.G}=-Waffen_grenadier|680606921|669282384 the file contains much more lines.this element | separate the differents parts I would like to make a php that past the info in 3 1 should be the name (for example in the 1st line -={P.A.G}=-Draven) 1 should be the first num (for example in the 1st line 669078528) the last should be the 2nd num (for example in the 1st line 668468420)
View Replies !
View Related
How To Automatically Make URLs Posted In A Forum Active Links?
I've been working on modifying a forum script for some time now and its almost ready to go. You can test it at http://www.designlaunchpad.com/forum if you like. The one additional feature I want to implement is the automatic creation of a link when someone posts a URL in their message. Most forums have this, is it that tough to add in? I'm pretty comfortable editing PHP and understanding what is happening where but I suck at authoring it. I checked the manual at php.net and tried searching this forum and google but keep running into dead ends. So can someone offer me some suggestions or point me toward some help?
View Replies !
View Related
Make My Webpage Create A File For Each Person
I am trying to make my webpage create a file for each person that submits a file, so at first I was using... $myfile=fopen("create/$user.txt","w"); This worked, and it would create the file if it was not there. Then I decided that each user would recieve their own directory, and that the first file to be edited was called options.txt, in their user directory. So, I used this: $myfile=fopen("create/$user/options.txt","w"); But it came back saying that the directory did not exist. Is there a way to create a directory along with the new file that goes into it?
View Replies !
View Related
Make Uploaded File Names Unique?
I have been working on an upload script and it occurred to me that there would be a problem if someone tried to upload a file that already exists. Instead of producing an error message telling the user to rename their file, that i should append something to the uploaded filename to make it unique. I'd thought for the purposes of the system i am making (relatively low number of users) that a timestamp down to the second would be a sufficient measure to ensure that this problem does not occurr. Code:
View Replies !
View Related
|