Jump to content

I have a heavy script ?


qwe010

Recommended Posts

hi all

I have a heavy script

I think that the reason this code



[quote]$Phpar=mysql_query("SELECT * FROM prog_script ") or die (mysql_error() );

while($M=mysql_fetch_array($Phpar)){

$file_name=$M["file_name"];

$ID=$M["ID"];

$file_wsf=$M["file_wsf"];

$file_size=$M["file_size"];

$file_ex=$M["file_ex"];

$file2=$M["file2"];

echo"<div align='center'>

  <center>

  <table border='1' cellspacing='1' width='100%' id='AutoNumber1' height='35'>

    <tr>

      <td width='16%' align='center' height='1'><span lang='en-us'>

      <font face='Tahoma' size='2' color='#800000'>$file_name</font></span></td>

      <td width='38%' align='center' height='1'><span lang='en-us'>

      <font face='Tahoma' size='2' color='#008080'>$file_wsf</font></span></td>

      <td width='10%' align='center' height='1'><span lang='en-us'>

      <font face='Tahoma' size='2' color='#000080'>$file_size</font></span></td>

      <td width='15%' align='center' height='1'><a href='$file_ex'>

      <img border='0' src='$file_ex' alt='ÇÖÛØ Úáì ÇáÕæÑÉ áÊßÈíÑåÇ' width='108' height='60'></a></td>

      <td width='11%' align='center' height='1'>

      <a href='download.php?file=http://{$HTTP_HOST}{$REQUEST_URI}$file2'>

      <img border='0' src='img/links.gif' width='20' height='20'></a></td>

      <td width='10%' align='center' height='1'><span lang='en-us'><font face='tahoma' size='2' font color='#ff0000' ><b><S CRIPT language='JavaScript' src='download.php?downloads=http://{$HTTP_HOST}{$REQUEST_URI}$file2'></S CRIPT></span></td>

    </tr>[/quote]


How i can change it ?

please
Link to comment
https://forums.phpfreaks.com/topic/21919-i-have-a-heavy-script/
Share on other sites

my be Because i use this functions

[code]<?php



$version="v1.0";

if(phpversion() >= "4.2.0"){

if(is_array($_SERVER)){

extract($_SERVER, EXTR_PREFIX_SAME, "server");

}

if(is_array($_GET)){

extract($_GET, EXTR_PREFIX_SAME, "get");

}

if(is_array($_POST)){

extract($_POST, EXTR_PREFIX_SAME, "post");

}

if(is_array($_COOKIE)){

extract($_COOKIE, EXTR_PREFIX_SAME, "cookie");

}

if(is_array($_FILES)){

extract($_FILES, EXTR_PREFIX_SAME, "file");

}

if(is_array($_ENV)){

extract($_ENV, EXTR_PREFIX_SAME, "env");

}

if(is_array($_REQUEST)){

extract($_REQUEST, EXTR_PREFIX_SAME, "request");

}

if(is_array($_SESSION)){

extract($_SESSION, EXTR_PREFIX_SAME, "session");

}

}

class Mysql {

var $mysql_username;

var $mysql_password;

var $mysql_db;

var $mysql_host;

var $result_id;

var $link_id;

var $dbconnect;

var $num_rows;

var $query_count=0;



function Connect() {

require("config.php");

$this->mysql_username=$mysql_username;

$this->mysql_password=$mysql_password;

$this->mysql_db=$mysql_db;

$this->mysql_host=$mysql_host;

$this->link_id=mysql_connect($this->mysql_host,$this->mysql_username,$this->mysql_password);

if (!$this->link_id) {

echo "Unable to connect to mysql server";

}

$this->dbconnect=mysql_select_db($mysql_db);

if (!$this->dbconnect) {

echo "Unable to select database";

}

return $this->link_id;

}

function Query($sql) {

$this->result_id=mysql_query($sql) or die(mysql_error());

$this->query_count++;

return $this->result_id;

return $this->query_count;

}

function Num_rows() {

$this->num_rows=mysql_num_rows($this->result_id);

return $this->num_rows;

}

function Free_result() {

mysql_free_result($this->result_id);

}

function Close() {

mysql_close($this->link_id);

}

}

function Naif()

{



}



?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/21919-i-have-a-heavy-script/#findComment-98902
Share on other sites

[quote author=qwe010 link=topic=109342.msg442067#msg442067 date=1159311025]
up.............
[/quote]

If you want to provide more useful information, by all means do so. Bumping a thread isn't really helpful. If someone can work out how/if you can be helped, they'll find the thread.

This sounds more like a crap[sup]TM[/sup] web host than a scripting problem given what you've explained.
Link to comment
https://forums.phpfreaks.com/topic/21919-i-have-a-heavy-script/#findComment-99308
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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