PHP - Moved: How Do You Work?
This topic has been moved to Miscellaneous.
http://www.phpfreaks.com/forums/index.php?topic=327247.0 Similar TutorialsThis topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=314913.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=342142.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=356485.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=356031.0 This topic has been moved to Other Web Server Software. http://www.phpfreaks.com/forums/index.php?topic=331514.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=321864.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=348530.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=354151.0 This topic has been moved to Other Programming Languages. http://www.phpfreaks.com/forums/index.php?topic=354391.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=349470.0 I had to move hosters recently and I have a couple of scripts run using CRON to backup my MySql database and manage the number of backups that I keep. I can ask the hosters to deprecate the version of PHO backwards but I don't want to lose the opportunity of features that may be available in the new version. The main script essentially performs a MySqlDump to a specified directory and then emails me to tell me that it completed successfully. The second script just deletes any files in the backup folder more than x days old. I know mysqldump is a valid call so I should need to use anything other than that but I'm lost when it comes to seeing what is wrong with my scripts. backup.php
<?
/* CONFIGURE THE FOLLOWING SEVEN VARIABLES TO MATCH YOUR SETUP */
//$dbuser = $db_user, $conection ; // Database username
$command = "mysqldump -u $db_user --password=$db_password $db_name | gzip > $filename"; copy ($filename, $backdir.$newfile);
unlink($filename); //delete the backup file from the server
and delold.php
<?php
//echo "script is running";
if (is_dir("$path") )
}
This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=330364.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=308528.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=351058.0 This topic has been moved to Other Programming Languages. http://www.phpfreaks.com/forums/index.php?topic=312147.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=347820.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=357935.0 This one requires lots of up front information: I have a page, for this example that I will call page.php. It takes get parameters, and for this example I'll call the parameter "step". So I have a URL like this: page.php?step=1 This page has a form with an action of page.php?step=1. The code on the page validates the posting information. If the information is bad, it returns the user to page.php?step=1; if it is good, it takes the user to page.php?step=2 via header( "location:page.php?step=2" ). So redirection is done by relative path, not full URLs. This all works as expected. Now what I've done is set .htaccess to be HTTPS for this page, via this code: # Turn SSL on for payments RewriteCond %{HTTPS} off RewriteCond %{SCRIPT_FILENAME} \/page\.php [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] This works (initially). However, once you try to post the form, it just redirects back to the step=1 version of the page. I really don't know how or why that would be. I'm not sure how else I can explain this or what other information you may have. But it's frustrating to not get a page working in HTTPS that works in HTTP. Very odd. Any suggestions? (I don't even really know the best location to figure out when/why it's redirecting back to the original page.) Hi.., I use below method to export data to excel. header('Content-type: application/ms-excel'); header('Content-Disposition: attachment; filename=abc.xls'); if I run the script from the server. (http://localhost/export.php) it is work. (pop-up window if i want save or open the file) but if i run the script from the client (http://192.168.1.5/export.php) it is not work. (nothing happen) any idea how to solve this? require_once 'includes/upload.class.php'; $upload = new uploads(); $details = $upload->getFileInformation($id); <?php echo $details['upload_desc']; ?> then here the class. require_once 'db.class.php'; class uploads extends database { private $uploadData; function uploadFile() { public function getFileInformation($id) { $this->uploadData = $this->readData("uploadfiles", "upload_id", $id); return $this->uploadData; } But it wont work! |