Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
2 8
Impact
~11k people reached

  • 0 posts edited
  • 0 helpful flags
  • 6 votes cast
Nov
27
awarded  Popular Question
Apr
1
awarded  Notable Question
Dec
23
awarded  Popular Question
Sep
27
awarded  Notable Question
Sep
15
awarded  Popular Question
May
5
accepted Display all posts in a page code for template
May
4
accepted Creating a user's own folder on user registration
May
4
comment Display all posts in a page code for template
Thanks very much for this ... just got 1 problem ... the the_excerpt doesn't show at all....Any ideas why?
May
3
awarded  Student
May
3
asked Display all posts in a page code for template
May
3
revised Creating a user's own folder on user registration
added 451 characters in body
May
3
asked Creating a user's own folder on user registration
May
3
awarded  Supporter
May
3
awarded  Scholar
May
3
accepted Wordpress Image uploads plugin needed
May
3
asked Wordpress Image uploads plugin needed
Nov
7
revised Get current user data from external PHP page
added 387 characters in body
Nov
7
awarded  Commentator
Nov
7
comment Get current user data from external PHP page
It's not a wordpress template. It's a standalone php page. I just need to know the current wordpress user login name so that I can add it to the end of the $targetFolder path.
Nov
7
comment Get current user data from external PHP page
<?php //$targetFolder = '/uploads/'; // Relative to the root if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder; ////$targetFile = rtrim($targetPath,'/') . $_FILES['Filedata']['name']; $targetFile = $targetPath . $_FILES['Filedata']['name']; $fileTypes = array('jpg','jpeg','gif','png'); // File extensions $fileParts = pathinfo($_FILES['Filedata']['name']); if (in_array($fileParts['extension'],$fileTypes)) { move_uploaded_file($tempFile,$targetFile); echo '1'; } else { echo 'Invalid file type.'; } } ?>