Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-18-2006, 12:39 AM
|
#1
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Rep:
|
cgi bash script
hi there,
i want something really simple, basically i want to be able to click a button and execute a script, this script will then make a directory.
can someone tell me how to do that?
|
|
|
04-18-2006, 03:50 AM
|
#2
|
Senior Member
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037
Rep:
|
hi there,
why bash? here is the php code...
PHP Code:
<?php mkdir("/path/to/my/dir", 0700); ?>
you can easily assign a button to the function in html.
regards,
slackie1000
|
|
|
04-18-2006, 04:17 AM
|
#3
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Original Poster
Rep:
|
because that was just an example of what i want to do, i want to mount a cd drive, so i'll need to use bash
|
|
|
04-18-2006, 10:02 PM
|
#4
|
Member
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855
Original Poster
Rep:
|
hey slackie1000, i was wondering if you know how to mount a CD drive using php? i've tryied
Quote:
<?
echo exec('/bin/mount /dev/cdrom /media/cdrom &');
?>
|
|
|
|
04-20-2006, 03:03 PM
|
#5
|
Senior Member
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037
Rep:
|
hi there,
afaik you don't need the "echo" part.
PHP Code:
<? exec('mount /dev/cdrom /media/cdrom &'); ?>
this should work.
regards,
slackie1000
|
|
|
All times are GMT -5. The time now is 05:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|