hi,
i have an array that contains some names (1,4,6,56...). Every integer is a name of a folder.
I must to delete only the folders in array, i use this code:
Code: $all_folders = array();
while ($row = mysql_fetch_array($result)) {
$all_folders[] = $row['folder_id'];
}
function removedirfiles($all_folders){
$open=readdir($all_folders);
while($files=readdir($open)){
unlink("$all_folders/$files");
}
rmdir($all_folders);
}
removedirfiles("$all_folders");
but it returns those errors:
readdir(): supplied argument is not a valid Directory resource
rmdir(Array) [function.rmdir]: No such file or directory
noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.inc.php). I have never used cURL and cant find any good tutorials online so you guys are my last
Display the user's weight lost in the past week
Hello everyone,I am working on a weight loss app for my site, and I want to display the user's weight lost in the past week, I have the current weight and the total weight lost today working great,
Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i got that all set up but.Code: // connect to db... if ($_GET['id']) { $id = (int) $_GET['id'];
type check while uploading
Hi Everyone,How can I check the exact type of a file while uploading on my site?Here is the scenario:I have allowed only .jpg, .gif, .png files to be uploaded on my site. Suppose an user renames his
mysql UPDATE request not working and driving me crazy!!!
Hi,I have been stuck on this for ages.Quite simply I am trying to update my database with an update command:Code: $query="UPDATE `spence13_Portfolio`.`skillsList` SET `skillName` =
Is there a quick way to do this?
Hi all,I need to create a mysql table from php that goes a little something like thisid, name, total, place1today, place1yersterdayhowever place1today and yersterday need to goto place2, place3 upto
Images outside webroot
Im hopeing someone can help me with this because i cant figure it out.I have setup an ASP.NET website in C# that allows end users to upload files to the server. I am able to save these files outside
AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called through onClick="function ..." on the submit button. That all works perfectly, however the
cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8Because I'm completely new to cURL, just wanna get a page that requires a login... I wrote everything word for
remove innitial
and
tagsi am using tiny_mce as a text editor for my CMS.buy now the problem is it add <p> tag with dataso while retrieving the data for front end i get an extra space. so there is any why that i