Jump to content

Php-noob - Constructing and executing dos commands within php


Starwars

Recommended Posts

Hi everone!

 

I am trying to build my first application in php on a windows xp - mysql - apache framework. Its been fun :)

I need to execute a dos command from php which i am able to, using the ` ` constructs. However, here's where i am stuck -

My application folders are arranged app/files/X/hi.txt  ( X = { integers, not continuous})

I need to first check if the the 'X' exists and then host all the files in that directory. But then I cant seem to get the following working -

$a = X ...  [ From the user input]

$output = `dir /b app\files\$a`

 

($output is not assigned)

Is there a work around for this?

 

I would really appreciate some help!!

Thank you

SW

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.