Access the php script by opening the url. Execute the popen () function to execute svn update.

Source: Internet
Author: User
{Code ...} code Source: blog, a blog from Dr. Zhang N years ago. access the output result OKsvn, version1.6.11 (r934133) compiledApr112013, 16: 13: 51 Copyright (C) 2000-2009CollabNet ....
header("Cache-Control:no-cache,must-revalidate");$handle = popen('svn --version','r'); $read = stream_get_contents($handle);echo "
";printf($read);echo "
"; pclose($handle);

Source of code Zhang banquet blog N years ago: http://blog.s135.com/post/371/2/1/
In this way, access the output result in the browser is OK.

Svn, version 1.6.11 (r934133) compiled Apr 11 2013, 16:13:51

Copyright (C) 2000-2009 CollabNet. Subversion is open source software,
See http://subversion.tigris.org/This product has DES software
Developed by CollabNet (http://www.Collab.Net /).

The following repository access (RA) modules are available:

  • Ra_neon: Module for accessing a repository via WebDAV protocol using Neon.

    • Handles 'HTTP 'scheme
    • Handles 'https' scheme
  • Ra_svn: Module for accessing a repository using the svn network protocol.

    • With Cyrus SASL authentication
    • Handles 'svn 'scheme
  • Ra_local: Module for accessing a repository on local disk.

    • Handles 'file' scheme

Replace the second line of code
popen('svn up --username zmk --password 123456 /home/wwwroot/test/','r');
It won't work (nothing is output ).
If you replace the second line of code
popen('svn up --username zmk --password 123456 /home/wwwroot/xxx/','r');
Here/home/wwwroot/xxxIs the wrong address, and the final page will output
Skipped '/home/wwwroot/xxx'

Look at linux.

Now the user group and user of this script are www: www

Reply content:
header("Cache-Control:no-cache,must-revalidate");$handle = popen('svn --version','r'); $read = stream_get_contents($handle);echo "
";printf($read);echo "
"; pclose($handle);

Source of code Zhang banquet blog N years ago: http://blog.s135.com/post/371/2/1/
In this way, access the output result in the browser is OK.

Svn, version 1.6.11 (r934133) compiled Apr 11 2013, 16:13:51

Copyright (C) 2000-2009 CollabNet. Subversion is open source software,
See http://subversion.tigris.org/This product has DES software
Developed by CollabNet (http://www.Collab.Net /).

The following repository access (RA) modules are available:

  • Ra_neon: Module for accessing a repository via WebDAV protocol using Neon.

    • Handles 'HTTP 'scheme
    • Handles 'https' scheme
  • Ra_svn: Module for accessing a repository using the svn network protocol.

    • With Cyrus SASL authentication
    • Handles 'svn 'scheme
  • Ra_local: Module for accessing a repository on local disk.

    • Handles 'file' scheme

Replace the second line of code
popen('svn up --username zmk --password 123456 /home/wwwroot/test/','r');
It won't work (nothing is output ).
If you replace the second line of code
popen('svn up --username zmk --password 123456 /home/wwwroot/xxx/','r');
Here/home/wwwroot/xxxIs the wrong address, and the final page will output
Skipped '/home/wwwroot/xxx'

Look at linux.

Now the user group and user of this script are www: www

Refer to the code above in the php manual to see the problem.
I have answered your questions below. I will not paste and copy the link here.
Hope to help others who encounter the same problem!
Http://stackoverflow.com/questions/21870660/access-a-phpscript-through-the-browser-to-execute-the-function-of-popen-som

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.