php-windows Digest 6 Mar 2001 12:16:53 -0000 Issue 477

Topics (messages 5840 through 5848):

How to delete files?
        5840 by: alexlist
        5841 by: Gonzalo Vera

Re: Help with ODBC to Access query
        5842 by: Bob Hall
        5846 by: Fernando Madruga

javascript escape()/unescape() equiv
        5843 by: Mike Scalora

Read System Files /proc/...
        5844 by: Sauter Marc

Re: transparent
        5845 by: Chris Adams
        5847 by: Bacon Luvva

A sample of system function on Windows!!
        5848 by: Antonio Lopez

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------



Hi!

I'm a newbie in PHP and want to ask: how to delete files in PHP?
I tried to use unlink() function:
unlink ("mypic.jpg"); and got "Warning: unlink() is not supported in this
PHP build"
Then I used delete ("mypic.jpg"); and got "Fatal error: Call to undefined
function: delete()"

I have PHP Version 4.0.1pl2 under Apache 1.3.7 on Windows NT4.0 with Service
Pack 6.

Thanks.

Alex.





Change PHP version. AFAIK, version 4.0.1 had that clear bug (check out
the commented manual at php.net, it's probably still there). Install
the latest version (4.0.4pl1). The function name is unlink(), not
delete().

 Gonzalo.


> Hi!

> I'm a newbie in PHP and want to ask: how to delete files in PHP?

> I tried to use unlink() function:> Then I used delete ("mypic.jpg"); and got "Fatal 
>error: Call to undefined
> function: delete()"

> I have PHP Version 4.0.1pl2 under Apache 1.3.7 on Windows NT4.0 with Service
> Pack 6.

> Thanks.

> Alex.






>Hello,
>
>I'm trying to get the following query to work:
>
>     $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
>                       DatePart("m", CallDate) AS MonNum
>                 FROM CallData
>                 WHERE (CallDate Between #1/1/00# AND #12/31/00#)
>                   AND Driver = 1731
>                 GROUP BY DatePart("m", CallDate)';
>
>It returns the following error:
>
>Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too 
>few parameters. Expected 1., SQL state 07001 in SQLExecDirect in 
>d:\internet\apache\htdocs\db\test.php on line 48
>
>Line 48 is :     $result = odbc_exec($connect, $query1);
>
>The connection is established okay, as other queries work:
>
>
>     $query2 = "SELECT RunNumber, CallDate AS TDate, CallUnit, 
>CallDutyCrew AS Crew, PtNum, NatureFull, Driver, Attendant1, 
>Attendant2
>                 FROM CallData
>                 WHERE (CallDate Between #1/1/00# AND #12/31/00#)
>                   AND Attendant1 = $id
>                 ORDER BY RunNumber";
>
>I've tried escaping the m's in the DatePart (I initially used 
>double-quotes " " around the query string),  tried changing the 
>COUNT(RunNumber) to COUNT(*), etc without success.  The query runs 
>fine as written if entered directly into Access.
>
>Any ideas?
>
>SWS

Sir, I've been struggling with similar ODBC problems all afternoon. 
Try saving your query as a query in Access, and then passing "SELECT 
* FROM query_name". Sometimes this works, and sometimes it doesn't.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak





I don't know about MySQL, but some other SQL databases I've used MUST have
all fields specified in the WHERE clause returned in the SELECT! That is,
you should probably add ', CallDate' to the SELECT part so as to return it.
Just a thought.

Madruga

> I'm trying to get the following query to work:
>
>     $query1 = 'SELECT COUNT(RunNumber) AS RunCount,
>                       DatePart("m", CallDate) AS MonNum
>                 FROM CallData
>                 WHERE (CallDate Between #1/1/00# AND #12/31/00#)
>                   AND Driver = 1731
>                 GROUP BY DatePart("m", CallDate)';
>
> It returns the following error:
>
> Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few 
> parameters. Expected 1., SQL state 07001 in SQLExecDirect in 
> d:\internet\apache\htdocs\db\test.php on line 48





I am generating some javascript code in PHP and I need to do a javascript escape() in 
my PHP code so that the javascript can unescape() it on the client. I've looked though 
the online manual for PHP an can't find anything that helps so far. I think my only 
problem is line ends so maybe I only need to put the %0D and/or %0A in in place of 
them.




I wanna check my system with php.
So I wanna read the /proc/.xyz files on my
linux server.

But the system says access denied. ! WHY  ? 


cu 
sam




On 5 Mar 2001 10:56:59 -0800, Bacon Luvva <[EMAIL PROTECTED]> wrote:
>Is there a way to transparently download from another server such that
>no url is ever seen in the status bar using PHP.

Have you tried something like this:
<?
        header("Content-Type: type/of-the-remote-file");
        readfile("http://some.other.server/file");
?>




Hallo,

I have software located on another server and I do not wish to disclose
the url of that server.
Is there a way to transparently download from another server such that
no url is ever seen in the status bar using PHP. My whole site is PHP
mySQL driven and this is the only area where I am experiencing
difficulties.

Any assistance on this would be gratefully received.

Thanks

BaconLuvva









Can anyone give me a sample code of system function on Windows ?

I've tried it, and it's seems that doesn't work!!!


thank you!!



===================================================
Antonio López Luna
Ingeniería e Integración Avanzadas (Ingenia), S.A.
Parque Tecnológico de Andalucía
29590  - Málaga (Spain)
  
Tel. 34-952029300 Ext. 386
Fax. 34-952029309
Web: http://www.ingenia.es



Reply via email to