Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:32:17+00:00 2026-06-04T01:32:17+00:00

I am trying to add a script to BBEdit 10 that will validate PHP

  • 0

I am trying to add a script to BBEdit 10 that will validate PHP files. I have enabled PHP & Web Sharing on my Mac and I think the script is accurate but I am having an issue which I think is being caused by a volume name having a space.

property phpref : "/usr/bin/php -l "
try
    tell application "BBEdit" to get file of first text window
    do shell script phpref & POSIX path of result
    display dialog "Ok: " & result buttons {"Finished Checking"} default button 1
on error msg
    display dialog "Err: " & msg buttons {"Finished Checking"} default button 1
end try

I am getting an error with get file of. The error is: Could not open input file: /Volumes/ Data

The volume name is “Data HD” which is why I think the space is causing the issue. Can I escape a space when calling get file of?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:32:19+00:00Added an answer on June 4, 2026 at 1:32 am

    The question was answered at another site. I wanted to share the final answer. The issue was not with getting the file. It was with the command line using the file path.

    This is the correct and working scripr:

    property phpref : "/usr/bin/php -l "
    try
        tell application "BBEdit" to get file of first text window
        do shell script phpref & quoted form of POSIX path of result
        display dialog "Ok: " & result buttons {"Finished Checking"} default button 1
    on error msg
        display dialog "Err: " & msg buttons {"Finished Checking"} default button 1
    end try
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that I'm trying to add a HREF url in the
I have a toggle script that works great, but I'm trying to add a
I've been trying to add some AJAX/jQuery script to my site so that only
I am a jQuery noobie, and have been trying to add a script to
I am trying to add a birthday validation function in my php script to
I'm trying to add some error checking inside my PHP script. Is it valid
I'm trying to add a file upload script in php to a website I'm
I have a script where Im trying to add an eventlistener to a link,
This is the script I'm trying to add a last argument to that prints
I am trying to add some information to a python script that posts the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.