Jump to content

neodjandre

New Members
  • Posts

    6
  • Joined

  • Last visited

neodjandre's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello the following script imports a mySQL database in wordpress. However, i need to add the parameter --default_character_set utf8 Could you please help me out with the correct syntax? <?php //ENTER THE RELEVANT INFO BELOW $mysqlDatabaseName ='db123456789'; $mysqlUserName ='dbo123456789'; $mysqlPassword ='yourPassword'; $mysqlHostName ='db1234.perfora.net'; $mysqlImportFilename ='yourMysqlBackupFile.sql'; //DONT EDIT BELOW THIS LINE //Export the database and output the status to the page $command='mysql -h' .$mysqlHostName .' -u' .$mysqlUserName .' -p' .$mysqlPassword .' ' .$mysqlDatabaseName .' < ' .$mysqlImportFilename; exec($command,$output=array(),$worked); switch($worked){ case 0: echo 'Import file <b>' .$mysqlImportFilename .'</b> successfully imported to database <b>' .$mysqlDatabaseName .'</b>'; break; case 1: echo 'There was an error during import. Please make sure the import file is saved in the same folder as this script and check your values:<br/><br/><table><tr><td>MySQL Database Name:</td><td><b>' .$mysqlDatabaseName .'</b></td></tr><tr><td>MySQL User Name:</td><td><b>' .$mysqlUserName .'</b></td></tr><tr><td>MySQL Password:</td><td><b>NOTSHOWN</b></td></tr><tr><td>MySQL Host Name:</td><td><b>' .$mysqlHostName .'</b></td></tr><tr><td>MySQL Import Filename:</td><td><b>' .$mysqlImportFilename .'</b></td></tr></table>'; break; } ?>
  2. yes i need to do that... been postponing it for a while..
  3. thanxx that works.. btw any free php crash courses you can recommend online ? i dont want to be a stupid newb, php rules!
  4. ok i know how to use an image in html... but how do i put the image in the above code without messing up ? thanxx
  5. i get confused with the dots "." and the " ' " in the above syntax... worst thing is that when i upload the file to my server, the whole site crashes and i can't play around with trial and error...
  6. //change excerpt function custom_excerpt_more($more) { return ' …<br />' . '<a href="'. get_permalink($post->ID) . '">' . 'Continue Reading: '. get_the_title() . '</a>'; } add_filter('excerpt_more', 'custom_excerpt_more'); newbie alert... I need to change the above syntax to replace . 'Continue Reading: '. get_the_title() with an image.. I am a complete newb with php but i am good with html.. thanks Andy
×
×
  • 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.