Directory Deleted
So far i m using following code for deleting folders and files.But it will
only delete those folders which r empty.I want to delete those folders also
which has some files.pls give me the solution
<?php
error_reporting(0);
include("../connection.php");
$date = date("m/d/Y"); //For finding current current
function dateDiff($dformat, $endDate, $beginDate)
{
$date_parts1=explode($dformat, $beginDate);
$date_parts2=explode($dformat, $endDate);
$start_date=gregoriantojd($date_parts1[0], $date_parts1[1],
$date_parts1[2]);
$end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);
return $end_date - $start_date;
}
?>
....................
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Get ID Of Deleted Items
I wonder if there is anything similar to "mysql_insert_id();" for deleted/updated id's? If i do a query and DELETE WHERE text_field="", can i get the id's of the fields that were deleted?
Session Files Will Not Be Deleted
My problem: - i dont wan´t to destroy the session - i want that the session will be deleted by "php" when the gc maxlifetime parameter hits - i can turn this parameter on what i want - nothing will be deleted! - in my specail case - i make use of session_save_path - i use my own Could it be, that "php" doesnt delete session files in own session_save_paths ?
Deleted Php.ini And Cant Produce An Error
I deleted every instance of php.ini on my computer and restarted IIS. I was hoping i could envoke an error so I can figure out which php.ini it was using. But my application runs normally.
Help! Need To Recover Deleted Tables!
Im not sure if Im in the right place here but .. I am using a unusual combo of PHP MSSQL ODBC and MSAcess on a windows server 2003 box. All my tables in a database were deleted using the SQL "DROP TABLE" command. Can these be recovered? And if so, how?
Deleted Record Still Being Counted.
Can anyone see any reason why this query would not return the number of rows containing the correct "EID" "CID" where email address is "cs.com" or "webtv.com"..... for some reason it always returns 1 even if the database is empty. The only other flaw that I see is that I had a record that matched this criteria, then I deleted it from the database, but it still seems to want to count it for some reason. PHP Code:
$_SESSION['data'] Not Being Deleted?
I got a login script that basically does that: checks wether username and password is in a mysql file and then sets the variable loged_in to 1 like that PHP Code:
Filling In For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file. The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:
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?
Info Deleted Itself From Database?
I got some info (news system) in a SQL database but after some days it deletes by itself it happened to me once but i thought i didnt remembered that i deleted it but today it happened again...it deleted by itself! lol I have other tables in the same database so its a table problem... How can i fix this? Did i miss something at the table configuration?
I've Deleted Admin Username And Password,
I've deleted my admin username and password which was initially set at test. Now I can't log into my website as the administrator. How do I put Username and Password back so that I can set my own password and username again, log in to my website and edit it. Which file do I have to edit, and where do I re-set the Username and Password?
Updating Id Numbers To Be Consecutive After Deleted Some
I have a list of ip addresses that have accessed my web site and i have check boxes next to them so i can delete whichever ones i want. after i delete them, i want the name_id field to re-autoincrament after the other rows have been deleted. does anyone know how to do this? i know this line can set the autoinc to a new number, but how do i re autoinc the whole table?
Character Deleted And Mail Function
I use the mail function in order to send mail on a LAN Lotus Notes server (SMTP). I send big html mail with the "MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1" format. But, in the message, some characters are deleted, one for 10 lines. After a test, (message with 1234567890), a character is deleted approximately every 1000 character. Have you some ideas ? The problem is coming from php or Lotus Notes ?
Script To Access Expired/deleted Domains?
Does anyone know if there is a script available to access expired/deleted domains? If not, does anyone know how do you get access to the daily expired/deleted domains database?
Reset Row "id's" After Arbitrary Value Deleted
Is there a way to reset the auto_increment value and all subsequent values for that table if you delete an arbitrary row? example: row 0 - test info row 1 - test info row 2 - test info row 3 - test info new auto_increment value = 4 I delete row 2, so table looks like: row 0 - test info row 1 - test info row 3 - test info the auto_increment is still 4, but there are only 3 rows in the table and the values are not correct. Is there a function or easy way to "reorganize" the row values and reset the auto_increment?
A "few" Old Session Files Never Deleted?
I have session files stored in a special tmp directory specific to a virtual host instance. The Max_lifetime is long 86400 (1 day) which I don't suppose is the problem. Anyway the sessions do indeed expire and "most" of the old session files disappear as expected. Not all however. I am finding several old session files with Unix last mod times weeks in the past. This behavior observed on PHP 4.2 and 4.3.
Active Directory / Exchange / Active Directory.
I'm creating an Intranet module for a client (Forum, files upload...etc...etc). This client already has a huge server running on WIN2000 + IIS 4 + Exchange + Microsoft Active directory + proxy and finally PHP 4.03 + MySql. Problem #1 : All passwords are changed every weeks, so I want to be able to import users/pass from Microsoft exchange .... Does anyone have an idea to do such thing with PHP ? Problem #2: I would like that the user logged from the firm's network do not have to log. again when connecting the module. So, is it possible to do such thing ?
PHP As Directory
How would I go about using a PHP file like a directory, for example, "http://mysite.com/index.php/virtual_page23"? I would like to use that form instead of "http://mysite.com/index.php?p=virtual_page23". Also, is this possible in IIS?
Directory
In php is the way to upload all the contents of a user selected directory up to a certain spot on a website?
About Directory
How to check correctly if the directory already exist in the webroot? I've tried with this syntax: .... bool $state = mkdir( "test" ); if ( $state == false ) chdir( "test" ); ....
This Directory
Is there a way to read all of the files in the same directory without writing out the directory path? I want to put the same index file into a bunch of different folders and I want a way to say "This Folder" instead of changing the file each time.
Directory
How is it possible to return the current folder's name? I tried explode("",getcwd()) but that doesn't seem to work. Basically, getcwd yields C:path ofile I want to be able to return just the end (in this case, file)
Regarding OS Directory
What I'd like to do.. is hide the table "Links" if there's none there to be shown instead of having "There are no links here" I myself don't know how to do this but what i have noticed is if you don't have any categories it doesn't show up the table... just wanting the same thing to happen with the links table... I'm using OpenLD btw Code:
Uploading A Directory
It's very easy to upload a file using the post method with php. The user selects the file that he will upload and submits the form... What I want to do is uploading all the contents of a directory. The user will select a directory and all the files in that directory will be sent to the server. Is it possible to do this with php ? If so how ?
Creating Directory
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?
Best Way Of Showing Directory
Im tring to create a script that will show directorys and files.. but.. i cant get it ti show another directory.. for example right now the main directory is lets say.. bo and its showing another directory that is named images.. how can i get my file. that is in the boo directory to view the images directory...
Use File_exists On One Directory Only??
I am developing a system in php which enables users to upload files. Users can then select a directory and the files in that directory are then outputted in a table. However, I do not want users to be able to upload a file to a directory if a file of the same name already exists within that directory. I thought I could use file_exists but as I want to restrict the search to one folder at a time, as opposed to the whole file system, I dont think this will work. Another option was to run a loop on each file name in the directory and compare it to the name of the file being uploaded. This wont work either however as php considers test.doc and Test.doc to be different where as a file server considers them to be the same. Therefore if a file called test.doc already exists and a user tries to upload a file called Test.doc they will not be considered the same and the upload would be allowed by php. This would then overwrite the original file (test.doc) with Test.doc.
PHP Scripts To Run In Another Directory With IIS
I would like to have PHP for windows run in another directory than c:inetpubwwwroot. I have tride changeing parameters in php.ini in my c:php directory. But nothing changes. When I run the phpinfo() I always get Configuration File (php.ini) Path as c:windows. But I do not have the php.ini file there. Is there something I am doing wrong or is it a bug....
Chmod A Directory
How can I chmod a directory to 0777. I tried chmod ($myDirectory, 0777); but nothing happens.
Can't Get PHP To Run On ISS Virtual Directory.
I can't get PHP to run on ISS virtual directory. PHP runs fine if run from the www root, but if I create a virtual directory to another local drive and put the PHP files in there I cannot run them. If I put a normal html file in the virtual directory that works fine. I have checked the app mappings and PHP is in there and mapped, any ideas?
How To Get Current Directory ?
How to get the current directory under windows and linux (both share the same code)? I cannot use getcwd , because the server only support php3.
Enquiry On /tmp Directory
Warning : "The sessions directory does not exist: /tmp. Sessions will not work until this directory is created." I am getting this warning in my php based website, despite creating /tmp folder in the root dir where php is installed.
Checksum Of A Directory
I am trying to write a function wherein any change in the files in any folder on my webserver would shoot me an email alert. I thought that one easy way of doing it would be via monitoring files/folders for their checksum at periodic intervals but I have no clue how to calculate checksum for a file or folder via php. Can anyone point me in the right direction. I tried searching on google, but I guess I might be using the wrong keywords..
Hidden Php Directory
I've recently had what looks like an attack on a web server. The machine is running iis 6 on windows 2003 server. with php 5.0.3 and mySQL 4.1.8 installed and running. The attack has deleted my phpMyAdmin folder plus files and has hiddene the C:php directory. The folder isn't visible in Windows Explorer, but it can be viewed with the command line using the Run application. It also appears the folder with php in their name are also not visible. If anyone has any idea whatmight be causing this phenomena, please send whatever knowledge you have.
Renaming Directory
Anyone know how to rename a directory with php code. Or does the rename($file_old_name, $file_new_name); work with directories too??
Image Directory
I'm having problems with the directory structure of my website, the website is in php and each page has several includes. the problem is the includes keep changing their directory paths to images. so how do I link to images so that it is universally accepted througout the site, without using the http://www.mywebsite.com/images/.... way as this way takes longer for the webserver to process.
PHP And Active Directory
Via a PHP script (running on a LAMP configuration - PHP with LDAP support), I run queries on the LDAP server of our office (users and arguments). Now, I want to put the result of this query (user information) in a Windows 2003 AD. I use PHP-ldap functions to connect with the domain controller: making connection is no problem, but binding (authenticated, I even tried Domain Administrator credentials) doesn't work... Does anyone has experience with this matter (PHP and AD connection/communucation)?
IIS+PHP: The Directory Name Is Invalid.
I have recently migrated from win98+PWS to winXP+IIS, and after that an problem has occured. When I open some of my PHP pages, I get this instead of the page I shlud get: <html><head><title>Error</title></head><body>The directory name is invalid. </body></html> Now, the interesting part is the fact that this doesn't happen every time I try to open a specific page (it happens in 80% of cases, but sometimes it (the page) just opens like nothing's wrong) and that it happens on all of my PHP pages! I presume I have misconfigured IIS... but I don't know where to start searching for a problem... does IIS have logging? Does PHP have logging? Or, has anybody encountered similar problem? I use: IIS 5.1 PHP Version 4.3.0 IE 6.0
Finding Directory
would like to know if there is a way to locate a specific directory on your site. I have a script which scans a directory, but it is not always running in the same directory, so the relative path to the scanned directory will be changed. Is there a way to find the location of the directory to be scanned, and build a relative url to it?
Run PHP Scripts Outside Of The Web Directory
Is it possible to run a script that will be used from all the websites on the server outside of the web dir ? At the moment for every site I have I upload the script in the web dir of the specific site... Specifically it is a RichEditor so it has javascripts as well ... But it is difficult to maintain updates of the script to all websites so I would prefer if I had only one place to update it...
Getting Current Directory
Can anyone tell me how i can get php to retrieve the directory i am working from (Home Directory)the reason i ask is i am getting a directory listing of my images folder and i dont want to have to enter the complete path to that directory (C:lahdahimages) i want to be able to just enter the images folder as my folder to retrieve.
Current Directory
Anyone know that how to find the current directory's name in php? I need the php automatic to find its current directory's name.
Php Directory Structure
im a little worried about security in a site im designing and have a proposition.. i thought about keeping every single php and inc file in a directory beneath the web directory.. such that NONE of the files can be accessed from a web browser.. then.. when a user requests, for example, to use the built in login page which is entitled login.php.. i simply use apache to forward this page login.php in a different directory.. i can as well use mod rewrite to accomplish similar things.. im trying to think of the reasons that something like this would NOT be a good idea.. i imagine i could create all the php files in a seperate folder on the same level, perhaps title pseudoWWW, and have the entire web strucutre of phps' and incs' in there, and then, when someone requests www/login.html, it doesnt have to have a specific directive in apache to go to login.php, rather, go to the file in the pseudo directory with the same name, but a php extension, run the script, output the results.. then the user wouldn't have any idea that the php script even exists, let alone where it is and what it's doing.
Creating Directory
i've stored as "MPEG PAL" in a string variable say $directory.(i've tested using is_string() function).Now when creating a directory using exec(mkdir $directory); it creates two directories MPEG and PAL. I need these two to be a single directory MPEG PAL. How can i do it.i've stored into $directory from text box.
PHP Create Directory.
im strugling with this for days now... so please help ih you know... it's UNIX server, i'm trying to find working script that would create directories recursively... script is in www.server.com/cp/uploadfiles/script.php and function should be called like 'createDir ("../../files/aa/bb")' -> only "../../files" exists.
Mapping A Directory...
I was wondering if anyone here knows how to use PHP to 'map' a folder and all sub-folders and files within it... Anyone who has been to tabcrawler knows sorta what I mean... I need a folder such as 'guides' to be taken and a list of sub-directories ('x-box', 'gamecube', etc) to be shown in the form of links. When clicked, the links should open to look almost identical to the first one with the sub-directory acting as the new directory and the files contained in it as the new sub-directories, only, these files should open regularly into the browser..
|