Jump to content

Class work on other host but wont work now!


Deanznet

Recommended Posts

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!

 

 

 

Link to comment
Share on other sites

Heres the full page.

 

require_once 'includes/upload.class.php';

$upload = new uploads();

$details = $upload->getFileInformation($id);

$id;

 

preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id);

$id = $id[1];

$details = $upload->getFileInformation($id);

$encid = md5(time().mt_rand(101,887));

//echo $offer['id'];

//print_r($_GET);

 

<?php echo $details['upload_desc']; ?>

 

 

I think i know the problem.

 

preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id);

 

My url looks like this.

 

mysite.com/file/ID/title

 

the other site looked like this othersite.com/download/ID-filename.txt

 

 

So my question is how do i change preg_match("#/download/([\d]*)-#i", $_SERVER['PHP_SELF'], $id); to match

 

mysite.com/file/ID/filename

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.