convert bytes MB with PHP getSize

I thought I had cracked the nut of a previous debate.

http://forums.Adobe.com/message/4741283#4741283

A file works fine on my local test server.  But on the remote site, the results are an unsorted mess.

I found a script that handles this pretty well.

<? PHP

class SortingIterator implements IteratorAggregate

{

private $iterator = null;

public function __construct (Traversable $iterator, $callback)

{

If (! is_callable ($callback)) {}

throw new InvalidArgumentException ("given callback is not callable!'");

}

$array = iterator_to_array ($iterator);

usort ($array, $callback);

$this-> iterator = new ArrayIterator ($array);

}

public void getIterator()

{

Return $this-> iterator;

}

}

? >

<! - results - >

< ul >

<? PHP

function mysort ($a, $b)

{

return $a-> getPathname() > $b-> getPathname().

}

$it = new SortingIterator (new RecursiveIteratorIterator (new RecursiveDirectoryIterator ("PATH/MY_DIRECTORY'")), "mysort");

{foreach ($it as $file)

echo "" < li > < a href = "". $file. « « > ». $file-> getFilename(). "< /a > -". $file-> getSize().' bytes < /li > ';

}

? >

< /ul >

All I need now is a simple way to convert results getSize bytes in MB.

Any ideas?

Thank you

Nancy O.

Use the round() php function

http://www.php.net/manual/en/function.round.php

round (file-> getSize() / 1048576, 2)

Tags: Dreamweaver

Similar Questions

  • Help me convert (BYTE) V2 to V2 (Char)

    Hello!
    Please, help me! I have already created several tables that have fields with Varchar2 parameter. Because
    Basically, there is Varchar2 (BYTE) parameters, fields created as Varchar2 (BYTE). I have the UTF-8 encoding used in
    database. Whereas now, I started to think that 1 tank in UTF not = 1 byte. So, how can I convert all fields
    with Varchar2 (Byte) to Varchar2 (TANK)? It is very important to me, now I know that. There are many tables,
    in order to edit a lot of time having conducted manually, but create new I can not, because many of the tables is now used :(

    Thank you!

    As I said in my first post, you need a LOG table and an exception block, then an outer join to exclude those who have already succeeded

    something like that;

    create table log_tbl (
      table_name varchar2(30)
    , column_name varchar2(30)
    , msg varchar2(200)
    , error_flag varchar2(1) default 'P') -- P for Pass and F for Fail.
    /
    
    SQL> select table_name, column_name, char_used
      2  from user_tab_columns
      3  where table_name in ('T1','T2')
      4  /
    
    TABLE_NAME                     COLUMN_NAME                    C
    ------------------------------ ------------------------------ -
    T1                             A                              B
    T2                             A                              B
    
    SQL> declare
      2    l_Err varchar2(200);
      3  begin
      4    for r in (select  atc.table_name, atc.column_name, atc.data_length
      5              from    user_tab_columns atc -- You would probably use ALL_
      6              left outer join Log_Tbl lt on (atc.Table_name   = lt.Table_Name
      7                                         and atc.Column_name = lt.Column_Name
      8                                         and lt.Error_Flag   = 'P')
      9              where   atc.data_type   = 'VARCHAR2'
     10              and     atc.char_used   = 'B'
     11              and     atc.Table_Name in ('T1', 'T2', 'T3')) loop
     12
     13      begin
     14        execute immediate 'alter table ' || r.table_name
     15                                        || ' modify '
     16                                        || r.column_name
     17                                        || ' varchar2('
     18                                        || r.data_length
     19                                        || ' char)';
     20
     21        insert into Log_tbl (Table_Name, Column_Name)
     22        values  (r.Table_Name, r.Column_Name);
     23
     24        exception
     25          when others then
     26            l_Err := sqlerrm;
     27            insert into Log_tbl (Table_Name, Column_Name, Msg, Error_Flag)
     28            values  (r.Table_Name, r.Column_Name, l_Err, 'F');
     29      end;
     30
     31      commit;
     32
     33    end loop;
     34
     35  end;
     36  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select table_name, column_name, char_used
      2  from user_tab_columns
      3  where table_name in ('T1','T2', 'T3')
      4  /
    
    TABLE_NAME                     COLUMN_NAME                    C
    ------------------------------ ------------------------------ -
    T1                             A                              C
    T2                             A                              C
    
    SQL> select table_name,column_name,error_flag
      2  from log_tbl;
    
    TABLE_NAME      COLUMN_NAME     E
    --------------- --------------- -
    T1              A               P
    T2              A               P
    
    SQL> create table t3 (a varchar2(20) )
      2  /
    
    Table created.
    
    SQL> insert into t3 (a) values ('Hello')
      2  /
    
    1 row created.
    
    SQL> declare
      2    l_Err varchar2(200);
      3  begin
      4    for r in (select  atc.table_name, atc.column_name, atc.data_length
      5              from    user_tab_columns atc -- You would probably use ALL_
      6              left outer join Log_Tbl lt on (atc.Table_name   = lt.Table_Name
      7                                         and atc.Column_name = lt.Column_Name
      8                                         and lt.Error_Flag   = 'P')
      9              where   atc.data_type   = 'VARCHAR2'
     10              and     atc.char_used   = 'B'
     11              and     atc.Table_Name in ('T1', 'T2', 'T3')) loop
     12
     13      begin
     14        execute immediate 'alter table ' || r.table_name
     15                                        || ' modify '
     16                                        || r.column_name
     17                                        || ' varchar2('
     18                                        || r.data_length
     19                                        || ' char)';
     20
     21        insert into Log_tbl (Table_Name, Column_Name)
     22        values  (r.Table_Name, r.Column_Name);
     23
     24        exception
     25          when others then
     26            l_Err := sqlerrm;
     27            insert into Log_tbl (Table_Name, Column_Name, Msg, Error_Flag)
     28            values  (r.Table_Name, r.Column_Name, l_Err, 'F');
     29      end;
     30
     31      commit;
     32
     33    end loop;
     34
     35  end;
     36  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select table_name, column_name, char_used
      2  from user_tab_columns
      3  where table_name in ('T1','T2', 'T3')
      4  /
    
    TABLE_NAME      COLUMN_NAME     C
    --------------- --------------- -
    T1              A               C
    T2              A               C
    T3              A               C
    
  • How to convert .vi .exe with the student LabView version

    Hello

    I would like to know if it is possible to convert .vi .exe with the student Labview version.

    Thank you

    N ° if I remember correctly, your license agreement specifically prohibits this. You would have to buy the professional version of LabVIEW. No real need for a student to create an exe file.

  • Convert byte [] to bitmap

    How convert byte [] bitmap and convert bitmap to byte [] image and when to get the image of the server back to a string how to parse this string for byte [] exmple in android it parse like that

    byte[] logoImg = Base64.decode(jLogo.getString(i), 0);
    

    Thanks in advance

    Hello

    You can use the method createBitmapFromBytes of the Bitmap class to convert an array of bytes to a Bitmap image. If you know that the image will be in PNG format you can even use createBitmapFromPNG

    Specification of the API:

    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/bitmap.html#createBitma...

    http://www.BlackBerry.com/developers/docs/7.0.0api/NET/rim/device/API/system/bitmap.html#createBitma...

  • Can someone guide me to implement my XP and Windows 7 based IIS to work with PHP?

    I tried to implement my workstation local based working with PHP, IIS servers but the instructions I can find are vague and so far, I did not get the servers to answer even a simple PHP script.  I was hoping since Expression Web products claim to be able to build PHP applications that by extension could someone give me advice to set up PHP to work with my local IIS installations.  I have Windows XP Pro and Windows 7 Pro work positions.  This is a forum for Windows 7 and I thought someone here might have the experience and knows how to get the operational product.  Just for reference, I'm trying to use php - 5.4.10 - Win32-VC9 - x 86, which is, in my view, their latest stable version.  VC9 is what they say to use with IIS.

    Documentation is an ISAPI filter that is available, but I can't find this dll in the decompression code.  The other alternative is "fastcgi", but I don't know how configured

    Hello

    The question you have posted is better suited for the TechNet forums. Please post the question in the following link for assistance:

    http://social.technet.Microsoft.com/forums/en-us/Iises/threads

    I hope that helps!

  • A website managed with PHP Muse?

    Hi, I inherited a Web site that was designed mainly with PHP coding. I'm not very well informed about PHP, but I know very well that Muse. My question is, can I manage the website PHP using Muse, or am I stuck with the learning of PHP (which is going to take time to learn)? Thank you.

    If you mean php like in wordpress so no, only of wordpress which will manage but if you mean real php like in the code very very old that person no longer used on the internet then I recommend you trash or use the Muse | Dreamweaver to rebuild.

    Learn php at this point IMO is worthless, unless you plan to work for a Government or another retro organization.

  • code snippets in color behavior plan DW in file with php

    Hello

    I have a PHP file loaded in DW.

    In this file are several HTML + PHP code snippets.

    The color scheme (on screen) of the HTML components is not the same in different parts of this file... Is this normal... or is it a mistake?

    It seems that the file is OK running in php.

    question:

    Snippets of HTML code of the system color (ie) are identical in all of the file?

    Fred K. says:

    Hello

    I have a PHP file loaded in DW.

    In this file are several HTML + PHP code snippets.

    The color scheme (on screen) of the HTML components is not the same in different parts of this file... Is this normal... or is it a mistake?

    It seems that the file is OK running in php.

    question:

    Snippets of HTML code of the system color (ie) are identical in all of the file?

    Looks like there is probably an error in your markup somewhere. Snippets of html code must be the same color except that you generate a script to mail electronic html or maybe a message of the form.

    If there is an error in the supplement of php, it would be unusual for the page to show anything it either - look so the html code.

    EDITED.

    In FACT if you are echoing of html with php elements that might be a different color, usually red in DW, identical to the php code.

  • Invalid accept header with PHP SDK 5.1 against 1.5.1 vCloud Director

    In PHP 5.1 SDK samples do not work against 1.5.1 vCloud Director?  Any code that I am trying to write with PHP 5.1 SDK really will work against my vCD 1.5.1?  Or it will fail as the samples?  Is there something I can do for samples and all this work?

    My question seems very similar to http://communities.vmware.com/message/2142668#2142668.  I've had some success with the SDK 1.5 samples against my 1.5.1 vCloud Director.  But when I've upgraded to the PHP 5.1 SDK, all I could get was "invalid accepts header" messages, like this:

    PHP Fatal error: Eception exception 'VMware_VCloud_SDK_Exception' with the message "POST ". https://vCloud.mydomain.edu/API/login failed, return code: 400, error: <? xml version = "1.0" encoding = "UTF-8"? >

    " < error xmlns =" http://www.VMware.com/vCloud/v1.5 "stackTrace =" com.vmware.vcloud.api.rest.handlers.exceptions.BadRequestRestApiException: invalid application accepts the header

    at com.vmware.vcloud.api.rest.common.handlers.ErrorHandler.getBadRequestApiException(ErrorHandler.java:71)

    at com.vmware.vcloud.api.rest.common.handlers.ErrorHandler.errorBadRequest(ErrorHandler.java:44)

    at sun.reflect.GeneratedMethodAccessor11639.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)

    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)

    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:133)

    to org.ap in /home/bob/lib/vcloudPHP-5.1.0/library/VMware/VCloud/ServiceAbstract.php on line 178

    After changing VCLOUD_API_VERSION in library/VMware/VCloud/Constants.php of 5.1 to 1.5, I get this:

    PHP Fatal error: Eception exception 'VMware_VCloud_SDK_Exception' with the message "POST ". https://vCloud.mydomain.edu/API/login failed, return code: 401 error,:, request data:
    ' in /home/bob/lib/vcloudPHP-5.1.0/library/VMware/VCloud/ServiceAbstract.php:178
    Stack trace:
    #0 home/bob/lib/vcloudPHP-5.1.0/library/VMware/VCloud/Service.php(114): VMware_VCloud_SDK_Service_Abstract-> message ('https://vcloud...) "(, 200) "
    #1 home/bob/lib/vcloudPHP-5.1.0/samples/login.php(78): VMware_VCloud_SDK_Service-> login ('vcloud.mydomain...', Array, Array)
    #2 {hand}
    lifting in /home/bob/lib/vcloudPHP-5.1.0/library/VMware/VCloud/ServiceAbstract.php on line 178

    A standard API call seems to work:

    curl - test id = true u scripty@system h ' Accept: application / * + xml; " version 1.5 =" https://vCloud.mydomain.edu/API/sessions

    Enter password for the user "scripty@system": Home


    HTTP/1.1 200 OK

    Date: Wednesday, November 28, 2012 17:43:56 GMT

    x vcloud-authorization: rxpTQIswdd15HNz + hZku6BCutGljF5VLUrt0M8x + IGI =

    Set-Cookie: vcloud-token = rxpTQIswdd15HNz + hZku6BCutGljF5VLUrt0M8x IGI plus; Guarantee; Path = /.

    Content-Type: application/vnd.vmware.vcloud.session+xml;version=1.5

    Date: Wednesday, November 28, 2012 17:43:56 GMT

    Content-Length: 1009


    <? XML version = "1.0" encoding = "UTF-8"? >

    " < session xmlns =" http://www.VMware.com/vCloud/v1.5 "user = org"scripty' = 'System' type="application/vnd.vmware.vcloud.session+xml' href =" https://vCloud.mydomain.edu/API/session/ "" xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " xsi: schemaLocation = " http://www.VMware.com/vCloud/v1.5 http://vcloud.the.usg.edu/api/v1.5/schema/master.xsd" > "" "

    "" < link rel = "low" type="application/vnd.vmware.vcloud.orgList+xml" href = " https://vCloud.mydomain.edu/API/org/ "/>

    "" < link rel = "low" type="application/vnd.vmware.admin.vcloud+xml" href = " https://vCloud.mydomain.edu/API/Admin/ "/>

    "" < link rel = "low" type="application/vnd.vmware.admin.vmwExtension+xml" href = " https://vCloud.mydomain.edu/API/admin/extension "/>

    "" < link rel = "low" type="application/vnd.vmware.vcloud.query.queryList+xml" href = " https://vCloud.mydomain.edu/API/query "/>

    "" < link rel = "entityResolver" type="application/vnd.vmware.vcloud.entity+xml" href = " https://vCloud.mydomain.edu/API/entity/ "/>

    < / session >

    Version switching in gross 1.5 to 5.1 API call causes the accept header message invalid, which is not surprising, now that I became familiar with the format and the requirement to accept header.
    For example, can code samples from the SDK 5.1 actually work against 1.5.1 API?
    Thank you!!!

    Hello

    PHP Fatal error: Eception exception 'VMware_VCloud_SDK_Exception' with message "POST https://vcloud.mydomain.edu/api/login failed, return code: 401 error,:, request data:"

    [Rajesh] Seems to me like a problem of password username. As it clearly says 401.

    After changing VCLOUD_API_VERSION in library/VMware/VCloud/Constants.php of 5.1 to 1.5, I get this:

    [Rajesh] SDK users should not change the code in the library. This is a bug with the SDK for not allowing users to change the version of API through the library (connection method accepts the version as well) rather than change in the library.
    Kind regards
    Rajesh Kamal.
  • PDF documents converted into Word with ExportPDF are secure?

    PDF documents converted into Word with ExportPDF are secure?

    Hi stonermarker,

    Please see this thread on the security of the documents on service online ExportPDF: Adobe ExportPDF security

    Best,

    Sara

  • How to convert a SQL with variable

    Can Hello, please how I convert the underside with a dominant

    I need to be able to generate a plan to explain it, I think I should use cast.



    SELECT TO_NUMBER (OIL. REBALANCE_ORDER_ID UNIQUE_ID),
    OIL. ORDER_QTY,
    OIL. ORDER_TYPE,
    OIL. ORDER_SIDE,
    OIL. POSITION_TYPE,
    OIL. AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL. GROSS_AMOUNT ORDER_AMT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL. FEE_AMT FEE_AMOUNT,
    OIL. ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    TABLE (: B6) OIL

    >
    I need to be able to generate a plan to explain it, I think I should use cast.

    SELECT TO_NUMBER (OIL. REBALANCE_ORDER_ID UNIQUE_ID),
    OIL. ORDER_QTY,
    OIL. ORDER_TYPE,
    OIL. ORDER_SIDE,
    OIL. POSITION_TYPE,
    OIL. AVAILABLE_QTY AVAILABLE_QUANTITY,
    OIL. GROSS_AMOUNT ORDER_AMT,
    OIL.NET_AMOUNT NET_AMOUNT,
    OIL. FEE_AMT FEE_AMOUNT,
    OIL. ACCRUED_INTEREST_AMT ACCRUED_INTEREST
    TABLE (: B6) OIL
    >
    You're right - mount the bind as the appropriate type. I have a SQL type named emp_table_type so that it works

    explain plan for select * from table(cast (:e1 as emp_table_type))
    

    The models involved are

    CREATE OR REPLACE TYPE SCOTT.emp_scalar_type as object
      (EMPNO NUMBER(4) ,
       ENAME VARCHAR2(10),
       JOB VARCHAR2(9),
       MGR NUMBER(4),
       HIREDATE DATE,
       SAL NUMBER(7, 2),
       COMM NUMBER(7, 2),
       DEPTNO NUMBER(2)
      )
    /
    
    CREATE OR REPLACE TYPE SCOTT.emp_table_type as table of emp_scalar_type
    /
    
  • How to convert a PDF with handwritten signature?

    How to convert a PDF with handwritten signature?

    Hi Lotus1215,

    Once the document is signed this document, we can edit, where the conversion is not possible

    Please see the article mentioned below

    http://forums.Adobe.com/docs/doc-1515

    I would like to know if you have any further questions.

    Kind regards

    ~ Dominique

  • Can I convert a server with software RAID with cold clone CD?

    I have a win2k3 server that has two disks (RAID 1 software), I can convert the server with software RAID with cold clone CD?

    Yes

    ___________________________________

    VMX-settings- WS FAQ -[MOAcd | http://sanbarrow.com/moa241.html]- VMDK-manual

  • Server error: Configure 9i with php

    Respected
    I want to configure oracle 9i 9.2.0.1.0 with php on windows xp version. First I tried with apache 2, but it has been clashing with oracle apache so I installed appserv 2.6.0 and given port 81 for the 'localhost:81 '. In this way, I managed to run the simple program php ' hello world ' using 'localhost:81/test/hello.php', but when I run the connected program (check below) it gives * "Web site has encountered an error when retrieving the http://localhost:81/test/test1.php. It is perhaps out of service for maintenance or configured incorrectly. * error HTTP 500 (Internal Server Error): an unexpected condition has occurred while the server attempted to respond to the request.
    I did it due to changes in php.ini and http.conf
    1 kept php.ini in c:\windows
    2. set the doc_root
    3 - extension_dir
    4 - session.save_path = "c:\temp"
    5 uncomment the line extension = php_oci8.dll
    http.conf
    1 - Allowoverride None for all
    2 - Element DirectoryIndex is set with index.php
    3 AddType command for php "AddType application/x-http - php.php ' value
    4 - LoadModule php6_module has been defined with 'LoadModule php6_module C:/AppServ\php\php6apache2_2.dll' Remeber appserv uses php 6 and I couldn't find "php_oracle.dll" in the post of php6

    Program online
    <? PHP
    $conn = oci_connect('scott@orcl','tiger','//localhost:81/orcl');
    {if(!$conn)}
    $m = oci_error ();
    echo $m ['message'], "\n";
    "exit";
    }
    on the other
    {
    print 'connected to oracle. "
    }
    oci_close ($conn);
    ? >

    * 2nd program *.
    <? PHP
    <?
    If ($conn = Ora_Logon ("scott@orcl","tiger")) {}
    echo "< B > SUCCESS! Connected to the database < B > \n";
    }
    on the other
    {
    echo "< B > Failed < B > \n";
    }
    Ora_Logoff ($conn);
    phpinfo();
    ? >
    Please help me where I'm wrong, I want to run php on the same computer where the database resides.

    Published by: 885098 November 2, 2011 12:03

    1. I haven't looked AppsServ. If it is the same that I Googled, then it looks like an older version of PHP.
    You might consider looking at Zend Server instead.

    2. Yes you need not software customer Oracle if PHP & Oracle DB are on the same machine. But if
    your PHP OCI8 dll built to require a minimum version of Oracle and your DB libraries
    is not equal to or greater than this version, then you will need to (a) get the minimum version of the Oracle
    libraries or (b) recompile PHP yourself.

  • Send an email with php and mysql

    I want a visitor to my site click on a field in mysql to email with a BCC to me also, I want the link to show 'Send an email' not the e-mail address of the field

    There is no way to hide a BCC address with a mailto link, because it just opens the e-mail program of the user with the address fields filled in.

    What I would recommend is to create a contact form, as described in Chapter 5 of PHP Solutions. Using PHP to send the form hides your email address and all BCC addresses. It appears from your description that the email will be sent to different people according to which the link is clicked. If this is the case, the programming becomes more complex, but you can solve this problem, once you have learned how to create a contact form and email with PHP.

    I hope PHP Solutions is sufficient for your needs, but I warn you to take Chapter 3 slowly. Do not try to memorize everything in Chapter 3. Just have a general idea for how the language is structured and re-enter the chapter whenever you need to refresh your memory. If you feel the need for another book, I think that the books of Visual Quick Start of Larry Ullman are good.

  • Call to undefined function getsqlvaluestring() with PHP mysql Dreamweaver

    Hey guys, I'm new to the forum and it seems very useful. I think I have a unique problem well.

    Although this script worked for a year or two, all of a sudden, during the holidays, he went to hay

    Front end is always get all the information, it must be the Database.But when I try to connect through the side admin I created with php and database of dreamweaver extensions normal I get this error.

    I do not know many php - then I'll hide the chain at the moment - if I need to paste the code that I'll - thank you in advance


    Fatal error
    : Call to undefined function getsqlvaluestring() in /xxxxx/xxxx/xxxxxxx/xxxxxxx/newsletters/xxxxxxx/xxxxxxx/admin/login.php on line 22

    Vicinity of line 22 looks like this

    @mysql_select_db ($database_promocenter, $promocenter);

    $LoginRS__query = sprintf ("SELECT username, password, destination_page FROM users WHERE username = %s AND password is %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "int"));

    $LoginRS = mysql_query ($LoginRS__query, $promocenter) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    First part looks like this

    < form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $loginFormAction;? > ">"
    < b >
    < td bgcolor = "#dedede" >
    < table width = "400" border = "0" align = "center" cellpadding = '3' cellspacing = "0" bgcolor = "#ffffff" >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > user name: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="username"type ="text"id ="username"size ="35"/ >"
    < / label > < table >
    < /tr >
    < b >
    < td height = "35" align = "right" valign = "middle" id = "description" > password: < table >
    < height td = "35" > < label >
    < input style = "height: 20px;" border: 1px solid #999999 "name ="password"type ="password"id ="password"size ="35"/ >"
    < / label > < table >
    < /tr >

    Anton

    Could also show you it could never work.  Why?  Because the call to the function is made before the function is defined.  He would always stop execution with an undefined function error.

    Now - it seems that you have added the users authentication that was placed before the code block in which the function is defined.  So I would say that you move it-

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="" {="" 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    from its current location to a new block just under the connection with the directive, i.e.,.

    MOVE HERE ? >

    <>

    Validate request to connect to this site.

    so that the final code looks like this-

    <>

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION< 6)="">

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    ?>

    <>

    Validate request to connect to this site.

Maybe you are looking for

  • Should an Airport Express put dish to work properly?

    Ludovic bought an Airport Express to use to expand the WiFi network created by my Time Capsule. Implementation has been virtually automatic. Well done Apple! Ideally, I would like to repair the Airport Express is on one end, and instead placed flat o

  • How to find how many times, how many numbers in a range of numbers (number of lines and columns) has been repeated (numbers 3.6.2)

    Hello I have a range of numbers from B2 - B11 until the G2 - G11. For example: 31 7 28 10 4 17 20 13 44 2 1 39 32 45 39 4 10 25 26 38 27 43 12 3 42 35 37 1 34 21 13 39 11 14 5 37 21 33 34 4 13 10 31 14 1 24 35 3 20 2 24 27 22 30 10 34 36 32 3 27 I wo

  • Windows updates fail to download and install the new

    Good afternoon I recently bought this satellite laptop computer pro on the package was both windows vista Home premium. I also decided to change fnsi at the same time. The provider also gives Norton Firewall Virus Intrusion etc etc. Microsoft does no

  • HP Pavilion P6-2065uk

    My pc locked and the only way to reboot was to unplug the power cable. When I plugged it back in and tried to turn it back on to the it, nothing happened, I checked the led on the power supply light, and it was not turned on. When I pulled the power

  • lost cd in the machine

    I inserted a cd into my HP all in one PC.  It is a tray mounted on the side.  The cd went and nothing happened so I tried to eject and try again and the cd disappeared and remains inside the computer.  How to get out?