Jump to content

Search the Community

Showing results for tags 'folder'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 7 results

  1. I am using a phpmailer to send emails to users. I noticed that it only sends email if I am calling it from a page in a root directory. Say I am sending an email from contact.php and it's inside a sub folder/directory instead of the root, it won't email out. Setup is like this. include_once '../phpmailer/class.phpmailer.php'; $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = '127.0.01'; // Specify main and backup server $mail->From = 'hello@myemail.com'; $mail->FromName = 'Myname'; $mail->AddAddress($user_email); // Name is optional $mail->WordWrap = 50; // Set word wrap to 50 characters $mail->IsHTML(true); // Set email format to HTML $mail->Subject = 'Your account has been deleted!'; $mail->Body = "Hello {$username},<br><br> We are letting you know that your account has been deleted"; if(!$mail->Send()) { $errors[] = $mail->ErrorInfo; } else { if(empty($errors)) { $db->commit(); $success = 'Email sent.'; } else { $db->rollBack(); } }
  2. Hi I echo out images from a folder. The problem is that I have a html file in the same folder but I don't want to echo that out. How can I write my code to get rid of the html in the output? Here my code: <?php $filetype = '*.html'; $dirname = substr('$filetype'); $i=0; if (isset($_POST['submit2'])) { //get the dir from POST $selected_dir = $_POST['myDirs']; //now get the files from within the selected dir and echo them to the screen foreach(glob($selected_dir . DIRECTORY_SEPARATOR . '*') as $dirname) { echo substr($dirname, 0, -4); echo '<img src="'.$dirname.'" />'; echo "<label><div class=\"radiobt\"><input type='radio' name='radio1' value='$i'/></div></label>"; } } ?> P.S. when I echo out : substr($dirname, 0, -4); I want to get ride of the html filename there too. How can I do so something like this?
  3. hi, i have an site in opencart. http:// www. domain.com/ i have chosen default currency as pound. and it shows great in frontend... i.e all products in pound. but.... http:// www. domain.com/folder/ in this ....when i have chosen default as dollar. and it shows in all products in dollar in frontend in this http:// www. domain.com/folder/ but currency changed in this also.... http:// www. domain.com/ .... it shows dollar instead of pound. i hope u understand what i asked!! can anybody sugggest me on this something... how to correct it.... ???? thanks.
  4. This is what I have: mkdir($username); $file=fopen($username."/index.htm","w"); fwrite($file,"<html>"."</html>"); fclose($file); where $username refers to what the user entered for their username. The .php I'm using this code in is merely for a signup process. I'm extremely new to PHP (like, today), so please go easy on me.
  5. Hi everyone. I create a website and now i want to optimize it and well structure it. Actually, all php file are in root directory and i want to well structure it. Is there a better way to structure it? i mean, include file should be with or not with display php page?, And what about processing page that validate form and inserting/update row in database then redirect to another page... they should be in their own folder? Thanks for your help. Pascal
  6. Hello follow programmers, I have a little question regarding my PHP code. I now have a perfect working code that takes my frame heigth and width and adjusts the image to the frame. Works great. The issue now is, I have multiple images in my dolder, how can I play them with a delay of say.. 10 seconds? Here is the piecer of my code that matters: Of course I have to count the images in the folder but how do I play them with a short break in it. <?php $img_folder = "../fotos/"; $imgs = dir($img_folder); while ($file = $imgs->read()) { $lengte = (strlen($file)-3); $extentie = substr($file,$lengte,3); //print "extentie $lengte = $extentie <br>"; if($extentie == "jpg" || $extentie == "JPG" || $extentie =="jpeg" || $extentie =="gif" || $extentie =="bmp"){ //print "tada<br>"; $size = getimagesize($img_folder.$file); $hoog = $size[1]; $breed = $size[0]; if(($breed/$screenW)>($hoog/$screenH)){ print"<img src=\"$img_folder$file\" width=\"$screenW\">"; }else{ print"<img src=\"$img_folder$file\" height=\"$screenH\">"; } } } closedir($imgs->handle); } ?> Thanks in advance! Dave
  7. I created a folder system and this piece of code is in a column that list all the folders that have been created by the user. It then is supposed to allow the user to click on the folder name (link) and send it to a page that displays all the items that have been tagged with that folder name. My problem is that it's not clicking through to the page. You can click the link but it just sits there and does nothing. When only 1 folder is created it's fine but if you create more than one folder it just sits there. Any ideas? global $user; $username = $user->name; $listquery = mysql_query("SELECT * FROM folders WHERE username='$username'"); while ($rows = mysql_fetch_array($listquery)) { $id = $rows['ID']; $username = $rows['username']; $foldername = $rows['foldername']; $newfoldername = mysql_real_escape_string($foldername); echo " <script type='text/javascript'> function submitform() { document.myform.submit(); } </script> <form name='myform' action='viewfolder' method='post'> <input type='hidden' name='foldertoview' value='$newfoldername'/> <a href='javascript: submitform()'>$newfoldername</a> </form> <br> "; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.