MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
Moderators: Moderators
Forum RSS feedReply
Attachement
AuthorText
copticnet
Junior Member
Avatar

Posts: 42
Contributes: 0

Gender: _NEUTRAL_
Online: No
Date: 01/07/2007 23:29
Attachement
#post1249
Dear,
I wanted to know if it is possible to create a feature of attaching (uploading and/or url) files, images, and documents (doc, ppt, pdf, jpg, etc..) when posting an article or news in memht portal. Please reply and tell me your comment!
Edited: 01/07/2007 23:31
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 02/07/2007 17:14
Re: Attachement
#post1250
Hi

Creating an upload feature is very easy by using the class "uploadFile.class.php" included in MemHT Portal

Example of usage:
code
require_once("inc/class/uploadFile.class.php");
$upload = new uploadFile();
$upload->show_errors = false;
$upload->path = "myfolder/";
$upload->field = "myfile";

if ($myfile = $upload->upload()) {     
        echo "The file `$myfile` has been uploaded";
} else {
        echo $upload->error;
}
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 4642
Contributes: 1949

Gender: _MALE_
Online: No
Date: 02/07/2007 17:17
Attachement
#post1251
The input file field name from the form is selected with $upload->fiels = "myfile";

Example:
code
echo "<form name='form' method='post' action='' enctype='multipart/form-data'>";
echo "<input type='file' name='myfile' size='25'>";
echo "<input type='submit' name='Submit' value='Upload'>";
echo "</form>";
Delete Edit Quote
 
Reply
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo